Need help with loop

06/16/2010 15:23 DarkTwilight#1
hey guys.

I made a script and a loop.

Now i want to add a mouse click every time 5 times.

Anyone know or could help me with this?
06/16/2010 15:45 .nAno#2
You might get familiar with AdLibRegister() / AdLibUnregister() even if this is a real bad programming style ;)
For sth. better you should try to use Timer and an If-query executed in the loop.
06/16/2010 16:38 Jeoni#3
Try this:
PHP Code:
While 1
MouseClick
("left")
Sleep(5000)
WEnd 
Should work :)
06/16/2010 16:46 DarkTwilight#4
Quote:
Originally Posted by Jeoni View Post
Try this:
PHP Code:
While 1
MouseClick
("left")
Sleep(5000)
WEnd 
Should work :)
Hmm thanks!;)

So, If im getting this right ( I Started today so correct me if i am wrong! ^^ )

I add this at the bottom of my script as While 1.

And every 5 seconds it would click the position i would give? ( Ofc at my script i would change the time lol )

So my script will continue talking and then every 5-10 minutes it will click ?

Thanks again;)!
06/16/2010 16:49 bassbanane#5
not 5-10 minutes.
5000 means 5000 milliseconds so 5 seconds.
5min would be 300000 milliseconds so it would be sleep(300000) ;)
06/16/2010 16:57 DarkTwilight#6
Quote:
Originally Posted by bassbanane View Post
not 5-10 minutes.
5000 means 5000 milliseconds so 5 seconds.
5min would be 300000 milliseconds so it would be sleep(300000) ;)
i know i was just giving an example =D,

But i do i put

While 1
MouseClick ( "Left" [, 658, 505 [, 2 ]])
Sleep(25000)
WEnd

At the bottom of my script? xD sorry for my noob questionz.