Champak Posted September 5, 2006 Share Posted September 5, 2006 Is it possible to have an "or" on an "until" statement. Something like, do this until it reaches 100 or "bat" is on the screen? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 5, 2006 Moderators Share Posted September 5, 2006 (edited) Did you bother to even try it before you posted? Yes it's possible.Local $nNum = 100, $iCount Do $iCount += 1 Until $nNum = 'Impossible to equal' Or $iCount = $nNum MsgBox(64, 'Info', $iCount)Edit:Wait!!!What do you mean by Multiple?? Edited September 5, 2006 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Champak Posted September 5, 2006 Author Share Posted September 5, 2006 Thanks, actually no I didn't try it; I actually knew how to do this one. I asked because one of the "or" statements is based on an error which can't readily be reproduced. So I just wanted to know if the function would even work and then I would just put it in and put and end to it. It's like this: Dim $loopcount Do ((((((scripting)))))) $loopcount = $loopcount + 1 Until Not StringInStr( _IEBodyReadHTML ($oIE1), 'Sorry! an unexpected error has occurred') Or $loopcount = 100 Thanks for providing me with your wisdom once again. Link to comment Share on other sites More sharing options...
dabus Posted September 5, 2006 Share Posted September 5, 2006 Maybe you could use a while-loop. While 1 $loopcount = $loopcount + 1 ; don't know what you do here, just do it ;) If Not StringInStr( _IEBodyReadHTML ($oIE1), 'Sorry! an unexpected error has occurred') Then ExitLoop If $loopcount = 100 Then ExitLoop WEnd 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