AcidCorps Posted July 23, 2007 Share Posted July 23, 2007 I'm trying to get it so that I can read a webpage and copy text that next to the text I search for so if the pages says This is an example page it could find "This is" and then copy "example page" to a variable Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 23, 2007 Share Posted July 23, 2007 I'm trying to get it so that I can read a webpage and copy text that next to the text I search forso if the pages saysThis is an example pageit could find "This is" and then copy "example page" to a variableAre you using the IE.au3 UDF? Have you opened IE and navigated to the page? Have you read the HTML to a string variable? How far along are you? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
AcidCorps Posted July 23, 2007 Author Share Posted July 23, 2007 sorry I don't have the code on this computer that I'm posting from or I would post what I have so far I have it so that it has read the page and put it in a string variable Link to comment Share on other sites More sharing options...
PsaltyDS Posted July 23, 2007 Share Posted July 23, 2007 sorry I don't have the code on this computer that I'm posting from or I would post what I have so far I have it so that it has read the page and put it in a string variable Then it's just: $SearchTerm = "This is an " $String = "This is an example page" If StringInStr($String, $SearchTerm) Then _ $String = StringMid($String, StringInStr($String, $SearchTerm) + StringLen($SearchTerm)) MsgBox(64, "Result", '"' & $String & '"') There's probably a slicker (read RegExp) way, but this works within my "AutoIt For Dummies" understanding. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
AcidCorps Posted July 23, 2007 Author Share Posted July 23, 2007 That works except I don't want to find "This is an example page" I want it to find "This is" and then put "example page" into a variable so that "example page" could change and it would still be able to copy that part Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now