Recommended Posts

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++
ContinueLoop
WEnd

Edited by Derigian

Share on other sites

Global \$run=True

SetHotKey("p","pause")

While 1

If \$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)
WEnd

Func pause()

\$run=Not \$run

EndFunc

This does not end the loop but it skips

Share on other sites

Global \$run=True

SetHotKey("p","pause")

While 1

If \$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)
WEnd

Func pause()

\$run=Not \$run

EndFunc

This does not end the loop but it skips

​I want it to end the loop. Actually i just want it to end the script all in all,

Share on other sites

Then

SetHotKey("{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)
WEnd

Func _exit()

Exit

EndFunc

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