Thebarbarius 0 Posted January 5 Share Posted January 5 (edited) Hello i have this litle script : HotKeySet("{F8}", "_PauseScript") Func _PauseScript() $Paused = NOT $Paused While $Paused $pause = MsgBox(0, 'Pause', 'Script is paused') Sleep(100) WEnd ToolTip("") EndFunc Can you tell me how to make for show message 'Script is Paused" when i press F8 and if OK is pressed on msgbox continue script. Please help me THX Edited January 5 by Thebarbarius Link to post Share on other sites
Xandy 457 Posted January 5 Share Posted January 5 Hey there, will it be okay if I rename variable: pause to Paused? So that changing: Paused by returning value from MsgBox will flag release from loop. Just a second. Human Male Programmer (-_-) Xandy About (^o^) Discord - Xandy Programmer MapIt (Tile world editor, Image Tile Extractor, and Game Maker) Link to post Share on other sites
Musashi 615 Posted January 5 Share Posted January 5 Maybe something like this : #include <MsgBoxConstants.au3> HotKeySet("{ESC}", "_Terminate") HotKeySet("{F8}", "_PauseScript") Global $bPaused = False ; Main Loop While 1 Sleep(100) WEnd Func _PauseScript() $bPaused = True ToolTip("Script is paused", 10, 10) If MsgBox(0, 'Pause', 'Script is paused') = $IDOK Then $bPaused = False ToolTip("") Return EndIf EndFunc ;==>_PauseScript Func _Terminate() Exit EndFunc Xandy and TheSaint 2 "In the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move." Link to post Share on other sites
Thebarbarius 0 Posted January 5 Author Share Posted January 5 (edited) THX very very much Edited January 5 by Thebarbarius Link to post Share on other sites
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