Jump to content
Sign in to follow this  
pastak

Script Idling in background and waiting for hotkey

Recommended Posts

pastak

I would like my script to idle in the background without duing anything, and when i press the hotkey i set run the func binded.

Already got the hotkey set etc, and made the func but i cant get the script to idle.

I made a little loop, but when i press the hotkey the script stops after running the func.

I want it to keep idling after completing the func.

Share this post


Link to post
Share on other sites
pastak

HotKeySet("{F2}", "_F2a_Func")

Func _F2a_Func()
    MsgBox(0, "", "hotkey pressed")
EndFunc ;==>_F2a_Func

While 1
    Sleep(10);idle around
WEnd
I must have done something wrong in the loop then :mellow:

thanks

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.