Hi Jacque,
Very interesting, so I put in your code
Code: Select all
command searchForums
put "http://www.ncbi.nlm.nih.gov/pubmed/?term=" & urlEncode(the text of field Search) into tURL
answer "URL is:" && tURL -- just to be sure it's right
put url tURL into tData
answer "Result is:" && the result
answer "Data is:" && tData
end searchForums
I searched for McGrew MJ (this is one that does not work at all), the website was correct as I checked in pubmed and it brought down all the correct results together with the junk text, however my 5 boxes were blank so there is obviously a problem with parsing the data into the boxes; for some entries it works well but for others it does not work at all.
I have been trying to parse based on a line by line approach now, as I say this worked well for some entries as I was getting horribly confused with the skip approach and my code is
Code: Select all
on mouseUp
searchForums
put fld "Results2" into tText
put wordoffset("Results:",tText) into tStart
put wordoffset("[Pubmed]",tText) into tEnd
put word tStart to tEnd of tText into fld "Box1"
put line 1 to "10" of fld "Box1" into fld "BoxA" of card "test"
put line "11" to "22" of fld "Box1" into fld "BoxB" of card "test"
put line 23 to 33 of fld "Box1" into fld "BoxC" of card "test"
go card "test"
end mouseUp
command searchForums
set the htmlText of field "Results2" to URL ("http://www.ncbi.nlm.nih.gov/pubmed/?term=" & urlEncode(the text of field Search))
end searchForums
You mentioned there might be a better way to parse this data if the PMID: was on the same line. Could you possibly explain your thoughts on this? If I search McGrew MJ, these are the five results on pubmed I want to bring down
Results: 1 to 20 of 23
Select item 24223709
1.
A novel piggybac transposon inducible expression system identifies a role for akt signalling in primordial germ cell migration.
Glover JD, Taylor L, Sherman A, Zeiger-Poli C, Sang HM, McGrew MJ.
PLoS One. 2013 Nov 4;8(11):e77222. doi: 10.1371/journal.pone.0077222.
PMID: 24223709 [PubMed - in process] Free PMC Article
Related citations
Select item 22586100
2.
Efficient genetic modification and germ-line transmission of primordial germ cells using piggyBac and Tol2 transposons.
Macdonald J, Taylor L, Sherman A, Kawakami K, Takahashi Y, Sang HM, McGrew MJ.
Proc Natl Acad Sci U S A. 2012 Jun 5;109(23):E1466-72. doi: 10.1073/pnas.1118715109. Epub 2012 May 14.
PMID: 22586100 [PubMed - indexed for MEDLINE] Free PMC Article
Related citations
Select item 21124737
3.
Characterisation and germline transmission of cultured avian primordial germ cells.
Macdonald J, Glover JD, Taylor L, Sang HM, McGrew MJ.
PLoS One. 2010 Nov 29;5(11):e15518. doi: 10.1371/journal.pone.0015518.
PMID: 21124737 [PubMed - indexed for MEDLINE] Free PMC Article
Related citations
Select item 20220842
4.
Somatic sex identity is cell autonomous in the chicken.
Zhao D, McBride D, Nandi S, McQueen HA, McGrew MJ, Hocking PM, Lewis PD, Sang HM, Clinton M.
Nature. 2010 Mar 11;464(7286):237-42. doi: 10.1038/nature08852.
PMID: 20220842 [PubMed - indexed for MEDLINE]
Related citations
Select item 20184756
5.
Functional conservation between rodents and chicken of regulatory sequences driving skeletal muscle gene expression in transgenic chickens.
McGrew MJ, Sherman A, Lillico SG, Taylor L, Sang H.
BMC Dev Biol. 2010 Feb 25;10:26. doi: 10.1186/1471-213X-10-26.
PMID: 20184756 [PubMed - indexed for MEDLINE] Free PMC Article
Related citations
Thanks Jacque for all your help! Seems like this is a tougher task than I thought
Look forward to hearing from you!
