Thebarbarius Posted January 5, 2022 Share Posted January 5, 2022 (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, 2022 by Thebarbarius Link to comment Share on other sites More sharing options...
Xandy Posted January 5, 2022 Share Posted January 5, 2022 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 comment Share on other sites More sharing options...
Musashi Posted January 5, 2022 Share Posted January 5, 2022 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 comment Share on other sites More sharing options...
Thebarbarius Posted January 5, 2022 Author Share Posted January 5, 2022 (edited) THX very very much Edited January 5, 2022 by Thebarbarius 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