Jump to content
Sign in to follow this  
imacrazyballoono

Stopping script when a button is pressed

Recommended Posts

imacrazyballoono

How do I make it so that it will run a script until I press something like alt+s?

Share this post


Link to post
Share on other sites
Daniel W.

HotKeySet("{ALT}s",  "_exit")
;;;;;; Your Script

Func _exit()
    Exit
EndFunc

That's it


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites
imacrazyballoono

Wow, thanks that seemed too easy.

So just to make sure, if i follow this, it will do the script until i press it? so it will loop it?

Edited by imacrazyballoono

Share this post


Link to post
Share on other sites
Daniel W.

Anything is easy for anyone everytime.


--------------------------------------------------------------------------------------------------------------------------------Scripts : _Encrypt UDF_UniquePCCode UDF MS like calculatorInstall programm *UPDATED* --------------------------------------------------------------------------------------------------------------------------------[quote name='Helge' post='213117' date='Jul 26 2006, 10:22 AM']Have you ever tried surfing the internet with a milk-carton ?This is similar to what you're trying to do.[/quote]

Share this post


Link to post
Share on other sites
imacrazyballoono

I tried that, it didnt loop. Ill post it.

HotKeySet("{ALT}s",  "_exit")

$rnd1 = Random ( 0, 700)
$rnd2 = Random ( 0, 700)
MouseMove($rnd1, $rnd2, 1)
sleep(300)

Func _exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
Emperor

I tried that, it didnt loop. Ill post it.

HotKeySet("{ALT}s",  "_exit")

$rnd1 = Random ( 0, 700)
$rnd2 = Random ( 0, 700)
MouseMove($rnd1, $rnd2, 1)
sleep(300)

Func _exit()
    Exit
EndFunc
You forgot to put your script inside a loop.

HotKeySet("{ALT}s",  "_exit")

While 1
    $rnd1 = Random ( 0, 700)
    $rnd2 = Random ( 0, 700)
    MouseMove($rnd1, $rnd2, 1)
    sleep(300)
Wend

Func _exit()
    Exit
EndFunc

Share this post


Link to post
Share on other sites
imacrazyballoono

Ok, that didnt work, i had to sit for about 5 minutes pressing tab and using hotkeys. = ) anyway. alt + s didnt stop it.

Share this post


Link to post
Share on other sites
Emperor

HotKeySet("!s",  "_exit")

While 1
    $rnd1 = Random ( 0, 700)
    $rnd2 = Random ( 0, 700)
    MouseMove($rnd1, $rnd2, 1)
    sleep(300)
Wend

Func _exit()
    Exit
EndFunc

Try that, just had to change the HotKeySet() function to take the proper format.

Share this post


Link to post
Share on other sites
imacrazyballoono

yup, that worked fine. thanks a lot.

Share this post


Link to post
Share on other sites

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

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.