Derigian Posted May 4, 2015 Posted May 4, 2015 (edited) So I just made a example script for u guys to use to see as to what im trying to say, what i wanna do is set a key that once I press it, the loop will end, and set a key that once i press it it will run the loop. Here's my example script for u guys to use, thanks for viewing and helping that is if you do help! While $loop == 1$startx = 295$starty = 353$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 354$starty = 131$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 617$starty = 157$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)$loop++ContinueLoopWEnd Edited May 4, 2015 by Derigian
sdfaheemuddin Posted May 5, 2015 Posted May 5, 2015 Global $run=TrueSetHotKey("p","pause")While 1If $run=False Then ContinueLoop$startx = 295$starty = 353$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 354$starty = 131$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 617$starty = 157$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)WEndFunc pause()$run=Not $runEndFunc This does not end the loop but it skips
Derigian Posted May 5, 2015 Author Posted May 5, 2015 On 5/5/2015 at 12:58 AM, sdfaheemuddin said: Global $run=TrueSetHotKey("p","pause")While 1If $run=False Then ContinueLoop$startx = 295$starty = 353$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 354$starty = 131$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 617$starty = 157$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)WEndFunc pause()$run=Not $runEndFunc This does not end the loop but it skipsI want it to end the loop. Actually i just want it to end the script all in all,
sdfaheemuddin Posted May 5, 2015 Posted May 5, 2015 ThenSetHotKey("{ESC}","_exit")While 1$startx = 295$starty = 353$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 354$starty = 131$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)sleep (2000)$startx = 617$starty = 157$x = Int(Random($startx - 20, $startx + 20))$y = Int(Random($starty - 20, $starty + 20))MouseClick("left", $x, $y, 1, 0)WEndFunc _exit() ExitEndFunc
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