communist 0 Posted January 23, 2005 yes yes, i need help (again) anyway, what i wanna do is, make a program click something 50 times, click on a difrent location, and repeat that (click 50x + click) 30 times. what i came up with is: For $i = 1 to 30 For $i = 1 to 50 MouseClick( "left" , 485 , 435 , 1 , 1) Sleep(50) Next sleep(2000) MouseClick( "left" , 540 , 520 , 1 , 1) sleep(2000) Next but, as you can see, it doesn't really work, some1 have any idea how to do this? Share this post Link to post Share on other sites
SlimShady 1 Posted January 23, 2005 ;repeat that 30 times. For $L1 = 1 to 30 ;make a program click something 50 times For $L2 = 1 To 50 MouseClick( "left" , 485 , 435 , 1 , 1) Sleep(50) Next sleep(2000) ;click on a difrent location MouseClick( "left" , 540 , 520 , 1 , 1) Next Share this post Link to post Share on other sites
communist 0 Posted January 23, 2005 ;repeat that 30 times. For $L1 = 1 to 30 ;make a program click something 50 times For $L2 = 1 To 50 MouseClick( "left" , 485 , 435 , 1 , 1) Sleep(50) Next sleep(2000) ;click on a difrent location MouseClick( "left" , 540 , 520 , 1 , 1) Next<{POST_SNAPBACK}>thx! Share this post Link to post Share on other sites
adri 0 Posted January 23, 2005 ;repeat that 30 times. For $L1 = 1 to 30 ;make a program click something 50 times For $L2 = 1 To 50 MouseClick( "left" , 485 , 435 , 1 , 1) Sleep(50) Next sleep(2000) ;click on a difrent location MouseClick( "left" , 540 , 520 , 1 , 1) Next<{POST_SNAPBACK}>That should work well, I was looking for something similar to this aswell, thanks SlimShady Is there any way to keep track of the number of cycles or times repeated while the script is running? Thanks to Wolvereness for putting up with me and helping me ^_^ Share this post Link to post Share on other sites
SlimShady 1 Posted January 23, 2005 (edited) During runtime you can use the variables $L1 and $L2. You can change them ofcourse or assign them to another variable. Edit: For people who did not understand what I just said: I'll edit the above example to explain it. Example 1 ;repeat that 30 times. For $L1 = 1 to 30 ;make a program loop 50 times For $L2 = 1 To 50 MsgBox(64, "Test - $L2 Loop", "$L2 contains " & $L2 & " now.") Sleep(50) Next sleep(2000) MsgBox(64, "Test - $L1 Loop", "$L1 contains " & $L1 & " now.") Next Example 2 ;repeat that 30 times. For $L1 = 1 to 30 ;make a program loop 50 times For $L2 = 1 To 50 $val2 = $L2 MsgBox(64, "Test - $L2 Loop", "$val2 contains " & $val2 & " now.") Sleep(50) Next sleep(2000) $val1 = $L1 MsgBox(64, "Test - $L1 Loop", "$val1 contains " & $val1 & " now.") Next Edited January 23, 2005 by SlimShady Share this post Link to post Share on other sites