Hello Me You Posted January 18, 2007 Share Posted January 18, 2007 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. Random Link to comment Share on other sites More sharing options...
Helge Posted January 18, 2007 Share Posted January 18, 2007 Putting a tiny Sleep in your loop will fix the CPU-usage problem. Link to comment Share on other sites More sharing options...
Hello Me You Posted January 18, 2007 Author Share Posted January 18, 2007 You guys are awesome! Thanks for the fast reply. It works perfectly! Random Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now