Smigacznr1 0 Posted July 24, 2011 Could somebody tell me why script is exiting from loop if it in var $clipboard have string:%prg%1% For $i=0 To 1 Step +1 Sleep(2000) Send("{CTRLDOWN}c{CTRLUP}") $clipboard = _ClipBoard_GetData($CF_TEXT) ; $string_with_error = StringInStr($clipboard, "%err%FAILED at ", 1, 1) If $clipboard == "Canceled" Then ; MsgBox(0, '', "cos") ExitLoop ElseIf $clipboard == "Completed" Then ExitLoop ElseIf StringInStr($clipboard, "%err%FAILED at ", 1, 1) > 0 Then ExitLoop Elseif StringInStr($clipboard, "%prg%", 1, 1) > 0 Then $i=0 ContinueLoop(2) Else $i=0 ContinueLoop(2) EndIf Next BlockInput(0) WinClose("VMware vCenter Converter Standalone") Exit I checked clipboard. Pasted to notepad and I saw:%prg%1% What is going on? Share this post Link to post Share on other sites
wakillon 403 Posted July 24, 2011 ContinueLoop (2)"ExitLoop/ContinueLoop" statements only valid from inside a For/Do/While loopThe level 2 of the loop to restart doesn't exist here...If i remove "(2)" , script is not exiting with %prg%1% in clipboard. AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Share this post Link to post Share on other sites
Smigacznr1 0 Posted July 24, 2011 ContinueLoop (2)"ExitLoop/ContinueLoop" statements only valid from inside a For/Do/While loopThe level 2 of the loop to restart doesn't exist here...If i remove "(2)" , script is not exiting with %prg%1% in clipboard.Hmm... I can swear that I checked without (2) before.... Strange. Anyway, many thanks! Share this post Link to post Share on other sites