Jump to content
Sign in to follow this  
Guest icepick

While Loop - Do Until compile error

Recommended Posts

Guest icepick

Very embarrasing issue. I'm no expert with AutoIt, but I would certainly hope that I could figure this one out... but...

Version I'm using: v3.0.102

$state = 0
$checkdone = 0
Do
    $checkdone = PixelGetColor( 153, 847 )
    If $checkdone = 7425294 Then
        MouseClick("left", 153 , 847, 1)
        Sleep (100)
        $state = 1
    End If
Until $state = 1

The compile error reported is:

Until $state = 1

Error: "Until" statement with no matching "Do" statement.

Taking the same code and replacing:

"Do" with "While $state = 0"

and "Until $state = 1" with "WEnd"

results in the corresponding error:

Wend

Error: "Wend" statement with no matching "While" statement.

Would anyone be able to point out what I am missing?

Share this post


Link to post
Share on other sites

You got your 'End If' as two words, make it EndIF and try that.


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

Share this post


Link to post
Share on other sites

VBScript == newb!

You must be a newb :idiot:


"I thoroughly disapprove of duels. If a man should challenge me, I would take him kindly and forgivingly by the hand and lead him to a quiet place and kill him." - Mark TwainPatient: "It hurts when I do $var_"Doctor: "Don't do $var_" - Lar.

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...