AlmarM 22 Posted September 10, 2007 Heya, I have some problems with Unpausing... I know that pause is: HotKeySet("{PAUSE}", "TogglePause") Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc But I can't unpause the script... Can someone help me ? MinesweeperA minesweeper game created in autoit, source available._Mouse_UDFAn UDF for registering functions to mouse events, made in pure autoit.2D Hitbox EditorA 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Share this post Link to post Share on other sites
PsaltyDS 42 Posted September 10, 2007 While you are in the function called by a HotKeySet(), additional HotKey events cannot interrupt it. You should change a flag or something else that can be done very fast, and get out of that function quickly. Make your HotKey functions very short and sweet (and alway include a way to quit): Global $Paused = False HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "_Quit") While 1 If $Paused Then Sleep(100) ToolTip('Script is "Paused"', 0, 0) Else ToolTip("") EndIf WEnd Func TogglePause() $Paused = Not $Paused EndFunc ;==>TogglePause Func _Quit() Exit EndFunc Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Share this post Link to post Share on other sites
AlmarM 22 Posted September 10, 2007 Ty man its working MinesweeperA minesweeper game created in autoit, source available._Mouse_UDFAn UDF for registering functions to mouse events, made in pure autoit.2D Hitbox EditorA 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Share this post Link to post Share on other sites