Jump to content

Do ... Until ... Static8 contains ...


Recommended Posts

Hi guys,

I didn't find an answer to my problem in other do until topics, that's why I am here.

I need to pause my script until the text in a static control changes to something like "File prepared" or "New image".

Here is what I tried:

Do
      Sleep(500)
      $Status = ControlGetText("Prepare and Resize", "", "[CLASS:Static; Instance:8]")
Until
      StringInStr($Status, "prepared") > 0

 

AutoIt doesn't like it after "Until" and complains: Statement cannot be just an expression.

Is there another way to say that a word shall be included in a static control?

Glad for help.

Link to comment
Share on other sites

That StringInStr line should go right after Until (on the same line, not on a new one). You should currently have two errors: one syntax error on the line Until because there's no expression behind it, and one on the StringInStr line because it is considered a separate statement on a separate line, and a statement "cannot just be an expression"...

So: just concatenate the last two lines and you should be golden. Good luck :)

Roses are FF0000, violets are 0000FF... All my base are belong to you.

Link to comment
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
 Share

×
×
  • Create New...