Jump to content
Sign in to follow this  

AutoItX: WinExists after WinClose

Recommended Posts


Start condition: A window w/ caption 'Erase' exists

Running AutoItX in java script:

do {
} while(autoIt.WinExists('Erase'));

Surprisingly, this loop runs for ever.



returns 5: Window exists + Window is enabled

Running the AutoIt example script WinList.au3 does _not_ display a window 'Erase'

Looks like a bad problem in AutoItX?

Share this post

Link to post
Share on other sites

Wrong forum. 8)

Maybe the window doesn't close when you press the X button or send the close signal. Use a ProcessClose?

Share this post

Link to post
Share on other sites

The WM_CLOSE message is sent as a signal that a window or an application should terminate.

WinClose posts a WM_CLOSE message.

If the application doesn't do what is should, its not autoit's fault...

CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map

Share this post

Link to post
Share on other sites

What value does autoIt.WinExists('Erase') return?

Because your title used is only one word then perhaps the window refuses the close message until a child window closes?



One consideration is that your loop uses no sleep so it may send an exhaustive amount of messages to the window to close. Windows that normally receive too many messages go into a non responsive state so that maybe is your issue.

Edited by MHz

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.