Smigacznr1 Posted July 24, 2011 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?
wakillon Posted July 24, 2011 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
Smigacznr1 Posted July 24, 2011 Author 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!
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