Sign in to follow this  
Followers 0
Champak

Multiple until statement

4 posts in this topic

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?

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by SmOke_N

[center]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.[/center]

Share this post


Link to post
Share on other sites

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. :P

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0