bigal12 Posted August 24, 2012 Posted August 24, 2012 (edited) hi i am new to autoit and need a bit of help with my script, where you see **************** is the part that needs to be repeated and the number of times is at the end of the *******************any help would be grate cheers Func exitthescript() ExitEndFuncHotKeySet( "q", "exitthescript" )While ;Dim $box[4] = [0, 0, 10, 10];MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3])) ;0, 0 = the x,y value of the top left hand corner of the box 10, 10 = the x,y value of the bottom right hand corner of the boxMouseClick("left",83,44)Sleep(20000);20secondsMouseClick("left",1260,195)Sleep(20000);20secondsDim $box[4] = [1454, 290, 1568, 303]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [878,206,1001,228]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [979,401,1075,430]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [627,551,682,606]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [880,743,993,766]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 seconds**********************************************************************24Dim $box[4] = [766,646,895,668]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000 , 15000 )) ;10000, 15000=10 seconds, 15 seconds*********************************************************************Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [878,206,1001,228]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [981,642,1073,669]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 secondsDim $box[4] = [880,743,993,766]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000, 30000 )) ;10000, 30000=10 seconds, 30 seconds**********************************************************34Dim $box[4] = [766,646,895,668]MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3]))Sleep (Random ( 10000 , 15000 )) ;10000, 15000=10 seconds, 15 seconds*****************************************************************Send("{space}",0)Sleep (Random ( 3540000 , 3780000 )) ;3540000, 3780000=59mins, 63minsWEnd Edited August 24, 2012 by bigal12
Andreik Posted August 24, 2012 Posted August 24, 2012 (edited) You can use a for loop: For $i = 1 To 24 Dim $box[4] = [766,646,895,668] MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3])) Sleep (Random ( 10000 , 15000 )) ;10000, 15000=10 seconds, 15 seconds Next For $i = 1 To 34 Dim $box[4] = [766,646,895,668] MouseClick("left", Random($box[0], $box[2]), Random($box[1], $box[3])) Sleep (Random ( 10000 , 15000 )) ;10000, 15000=10 seconds, 15 seconds Next Edited August 24, 2012 by Andreik
bigal12 Posted August 24, 2012 Author Posted August 24, 2012 thanks for the help but i get seem to get While While^ ERROR >Exit code: 1 Time: 0.312
bigal12 Posted August 24, 2012 Author Posted August 24, 2012 never mind forgot to put while 1 at the top lol works a treat
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