davo818 Posted April 27, 2005 Share Posted April 27, 2005 Ok, here is what I want to do. I want to have it search on google for different words. Now, since I'm confused with iniread(Which I want to learn), I am using this stupid method. Anyway, here is the source SO FAR.. Sleep(100) HotKeySet("{ESC}", "Terminate") Sleep(100) Func Terminate() Sleep(100) ProcessClose ( "autoit.exe" ) EndFunc Sleep(100) $1 = 1 MouseClick("left", 330, 236, 1) Sleep(100) Send("random google search" &$1) Send("{ENTER}") Sleep(7000) MouseClick("left", 90, 131, 1) Sleep(10000) Ok, as you see, that just searches google then goes back. Now, how can I make it do this 40 times, and every time search a different word? Or have it add numbers in front of the random google search.. Thanks alot boys Link to comment Share on other sites More sharing options...
buzz44 Posted April 27, 2005 Share Posted April 27, 2005 Something like this, just an example but, $Words = StringSplit("wordone,wordtwo,wordthree,wordfour",",") For $I = 1 To $Words[0] ;Search code << $Words[$I] Next As you can see, replace the words, "wordone" etc with the 40 words. then each time it executes the For...Next loop it will go through the words and do the next one in line each time until all the words are done. Hope it helps. qq Link to comment Share on other sites More sharing options...
davo818 Posted April 27, 2005 Author Share Posted April 27, 2005 Something like this, just an example but,$Words = StringSplit("wordone,wordtwo,wordthree,wordfour",",") For $I = 1 To $Words[0] ;Search code << $Words[$I] NextAs you can see, replace the words, "wordone" etc with the 40 words. then each time it executes the For...Next loop it will go through the words and do the next one in line each time until all the words are done.Hope it helps.<{POST_SNAPBACK}>That def helps..How do I do 40 loops only?Thanks alot bro, big help~! Link to comment Share on other sites More sharing options...
davo818 Posted April 28, 2005 Author Share Posted April 28, 2005 Bump Link to comment Share on other sites More sharing options...
buzz44 Posted April 28, 2005 Share Posted April 28, 2005 It will loop 40 times, each time you want a different word. The example I provided will loop only 4 times because there are only 4 words. Replace the words 'wordone','wordtwo' etc, with your 40 words. qq Link to comment Share on other sites More sharing options...
davo818 Posted April 29, 2005 Author Share Posted April 29, 2005 If I put like 40 search things I GET Incorrect number of parameters in function call Link to comment Share on other sites More sharing options...
buzz44 Posted April 29, 2005 Share Posted April 29, 2005 ......................................... try this.$Words = StringSplit("wordone,wordtwo,wordthree,wordfour",",") For $I = 1 To $Words[0] MsgBox(0,"",$Words[$I]) NextExcept put 40 words instead of 4, and tell me what happens qq 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