Jump to content
Sign in to follow this  
Hello Me You

WinWait under condition ProcessExists

Recommended Posts

Hello,

My script is as follows:

Opt("TrayIconHide", 1)
Run("D:\Programma's\Opera\Opera.exe")
While ProcessExists("opera.exe")
WinWait("Fout in het script voor Internet Explorer")
WinClose("Fout in het script voor Internet Explorer")
WEnd

Problem is: I want it to wait for a error dialog, but when the process opera.exe is terminated, I want the script to stop too. I can simply delete the WinWait, but that results in a permanent 90% CPU usage. I tried other things, like IfElse etc., but without WinWait, the script uses much to much CPU.

Is there a solution for this? Like, 'wait for this window, under the condition that opera.exe still exists' or 'wait for this window to exists, and for this window to close'.

Thanks in advance.

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  

×
×
  • Create New...