Syruz Posted October 21, 2007 Share Posted October 21, 2007 Is there a way to search if the source code of a web page contains a word from a list/array of keywords? (using IE.au3). So it has to search if the source contains any word from a list of many keywords. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 21, 2007 Moderators Share Posted October 21, 2007 Is there a way to search if the source code of a web page contains a word from a list/array of keywords? (using IE.au3). So it has to search if the source contains any word from a list of many keywords.Well... StringRegExp+(_IEBodyReadHTML or _IEBodyReadText)Or StringReplace + @extended + (_IEBodyReadHTML or _IEBodyReadText)Or StringInStr + (_IEBodyReadHTML or _IEBodyReadText)Or StringRegExpReplace + (_IEBodyReadHTML or _IEBodyReadText) Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Syruz Posted October 21, 2007 Author Share Posted October 21, 2007 So theoretically this should work? $o_body = _IEBodyReadHTML($o_IE) for %i = 0 to 30 If stringinstr($o_body, keyword(i)) ;perform action EndIf Next Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 21, 2007 Moderators Share Posted October 21, 2007 So theoretically this should work?$o_body = _IEBodyReadHTML($o_IE)for %i = 0 to 30 If stringinstr($o_body, keyword(i)) ;perform action EndIfNextYes.. theoretically... as I have no way to test what you are doing.... but that looks like how I would approach it. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Syruz Posted October 21, 2007 Author Share Posted October 21, 2007 (edited) Ok, and sorry, just just beginning with AutoIt today. Is there a way to load a text file(containing keywords) into a list/array? Edited October 21, 2007 by Syruz Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 21, 2007 Moderators Share Posted October 21, 2007 Ok, and sorry, just just beginning with AutoIt today. Is there a way to load a text file(containing keywords) into a list/array?You'll have to be a lot more elaborate than that. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Syruz Posted October 21, 2007 Author Share Posted October 21, 2007 (edited) Like, lets say I have a .txt file which contains a list of keywords that I want to check if they are in the source, is there a way to fill an array by loading that text file. As in my earlier post im checking if in the body text there are any keywords from an array of keywords If stringinstr($o_body, keyword(i)). Edited October 21, 2007 by Syruz Link to comment Share on other sites More sharing options...
flyingboz Posted October 21, 2007 Share Posted October 21, 2007 More reading. Less Typing. Go over the helpfile. It will not only make you smarter, it will make you look smarter. Reading the help file before you post... Not only will it make you look smarter, it will make you smarter. Link to comment Share on other sites More sharing options...
Zedna Posted October 21, 2007 Share Posted October 21, 2007 Ok, and sorry, just just beginning with AutoIt today. Is there a way to load a text file(containing keywords) into a list/array?Look into AutoIt helpfile:_FileReadToArray() Resources UDF ResourcesEx UDF AutoIt Forum Search 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