rockets Posted October 26, 2009 Share Posted October 26, 2009 (edited) thing i want to do is make a function that is linked to a hot key, so when pressed it pauses the script until the button is pressed again, i figure Boolean values would be involved , but i don't know how to implement it. any help would be great, thanks. Edited October 26, 2009 by rockets Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 26, 2009 Share Posted October 26, 2009 There's an example that does just that in the helpfile. See HotKeySet(). .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
omikron48 Posted October 26, 2009 Share Posted October 26, 2009 Global $pause = False HotKeySet($key, "_Pause") ;Your code goes here Func _Pause() If $pause Then $pause = False Else $pause = True While $pause Sleep(100) WEnd EndIf EndFunc Link to comment Share on other sites More sharing options...
rockets Posted October 26, 2009 Author Share Posted October 26, 2009 Thanks , works well . Link to comment Share on other sites More sharing options...
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