Jump to content

WinWait never Returns


Recommended Posts

Hello,

 

I'm new on the use the AutoIt and i-m facing a problem that most of you will find silly.

I run a script in which i expect a timeout using WinWait method but it hangs forever.

Here the code:

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.3.16.0
 Author:         myName

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------


WinWait("SomethingDontExist",3)
    

 

I expect time out after three seconds since the title doesn't exist but my script hangs forever.

 

Can somebodyt drop suggestion?

Thanks for the help

Link to comment
Share on other sites

Your syntax is wrong. The timeout value in your script is the second parameter. If you look at the syntax for WinWait you will see that the second parameter is then optional Text parameter and the optional timeout parameter is the third. Change the script to 

WinWait("SomethingDontExist", "", 3)

and the timeout will work as expected.

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...