Jump to content
Sign in to follow this  
davo818

About variables and such

Recommended Posts

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

<{POST_SNAPBACK}>

That def helps..

How do I do 40 loops only?

Thanks alot bro, big help~!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

......................................... try this.

$Words = StringSplit("wordone,wordtwo,wordthree,wordfour",",")

For $I = 1 To $Words[0]
   MsgBox(0,"",$Words[$I])
Next

Except put 40 words instead of 4, and tell me what happens


qq

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...