Jump to content
Sign in to follow this  
fergicide

WinWait/WinExists failing

Recommended Posts

fergicide

The following code, compiled to x64 exe on Win7, fails to detect the generated window and pop up the second message.  What am I doing wrong?  Thanks!

MsgBox(0, "Shutdown", "This is a test")
WinWait("Shutdown")
MsgBox(0, "Title", "Window exists")

 

Share this post


Link to post
Share on other sites
Tekk

MsgBox(0, "Shutdown", "This is a test") ;~ This blocks until you press [  OK  ]
WinWait("Shutdown")                     ;~ Since you pressed [  OK  ] the MsgBox exited before you got here.
MsgBox(0, "Title", "Window exists")     ;~ You never get here.  You are still waiting for a window that you closed above…

Share this post


Link to post
Share on other sites
jdelaney

Run(@AutoItExe & ' /AutoIt3ExecuteLine  "MsgBox(0, ''Shutdown'', ''Hi!'')"')
WinWait("Shutdown")
MsgBox(0, "Title", "Window exists")


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.