gil900 83 Report post Posted October 2, 2015 The rule is simple, first you need set hotkey that when you presses it, the code will continue to the next line with GoToNextLine_HotKeySet($Key)the next step is to put the GoToNextLine() function on every line you want to stop the executing process. I I've included an example + function: expandcollapse popupGoToNextLine_HotKeySet('z') ; You need to set hotkey. You must call this function first on order to make it work! Local $hGUI ; Create GUI $hGUI = GUICreate("Test", 400, 300) GoToNextLine() ; here I use it. the next line will not execute until you presses on z key (in this case) GUISetState(@SW_SHOW) WinSetOnTop($hGUI,'',1) GoToNextLine('Next line will change the color to red!') ; same story but here I added extra informition.. GUISetBkColor(16711680) GoToNextLine('Next line will delete the GUI','The GUI was deleted "now"') ; same story but I added more info after... GUIDelete($hGUI) GoToNextLine('In the next line I will do something else... presses z to continue.') For $y = 0 To @DesktopHeight Step Int(@DesktopHeight*0.125) GoToNextLine('Now I going to next or first $y - '&$y&', and enter into the $y loop...') For $x = 0 To @DesktopWidth Step Int(@DesktopHeight*0.25) ToolTip($x&','&$y,$x,$y) Sleep(500) Next GoToNextLine('$y loop ended. are you sure you want to continue to the next loop or line? presses z to continue.') Next Func GoToNextLine_HotKeySet($Key) Local Static $globals If Not $globals Then Global $g_gtn_key,$g_gtn_exitloop EndIf If $g_gtn_key Then HotKeySet('{'&$g_gtn_key&'}') $g_gtn_key = $Key HotKeySet('{'&$g_gtn_key&'}','GoToNextLine_ExitLoop') EndFunc Func GoToNextLine($ExInfo_BeforeNext = '',$ExInfo_AfterNext = '') If Not IsDeclared('g_gtn_exitloop') Then Return SetError(1) ; You need to call GoToNextLine_HotKeySet() first Local Static $iLineCallNumber = 1 If $ExInfo_BeforeNext Then ConsoleWrite('Description for next Call: '&$ExInfo_BeforeNext & @CRLF) Do Sleep(100) Until $g_gtn_exitloop ConsoleWrite('GoToNextLine - Call '&$iLineCallNumber& @CRLF) If $ExInfo_AfterNext Then ConsoleWrite('Description for this Call: ' & $ExInfo_AfterNext& @CRLF) $iLineCallNumber += 1 $g_gtn_exitloop = 0 EndFunc Func GoToNextLine_ExitLoop() $g_gtn_exitloop = 1 EndFunc My recommended codes (that I worte):_SharedVar - declare shared variables between 2 or more process directly on memory SciTE Console: _cin _cout for SciTE Console [ConsoleIn (!!) , ConsoleOut , ConsoleClean ..] _GUIConsole - Create and write to alternative console + Enter inputs through the consoleCODENAME-SW_130416If the English is not good in this post/code, please correct it (But do only PM). Share this post Link to post Share on other sites