Mechaflash Posted August 14, 2012 Share Posted August 14, 2012 (edited) My GUI relies on a 3rd party application to run properly. How can look for the closing action of the other application, and perform actions based on it? i.e. User goes to close the other application, my application brings up the exit confirmation (and does not close the other application unless the user confirms it). Currently I've set it so that the program errors out if the other application is closed, but this can be cumbersome at times for the average user. Edited August 14, 2012 by mechaflash213 Spoiler “Hello, ladies, look at your man, now back to me, now back at your man, now back to me. Sadly, he isn’t me, but if he stopped using ladies scented body wash and switched to Old Spice, he could smell like he’s me. Look down, back up, where are you? You’re on a boat with the man your man could smell like. What’s in your hand, back at me. I have it, it’s an oyster with two tickets to that thing you love. Look again, the tickets are now diamonds. Anything is possible when your man smells like Old Spice and not a lady. I’m on a horse.” Link to comment Share on other sites More sharing options...
rudi Posted September 14, 2012 Share Posted September 14, 2012 Hi. AdlibRegister(PreventClosing,250) ; run that function 4 times per second (default) Func PreventClosing() Local $Title = "Title of exit dialog, other application" Local $Text = "Text of exit dialog, other application" If WinExists($Title, $Text) Then ; do whatsoever is appropriate here EndIf EndFunc ;==>PreventClosing if there is no exit confirmation dialog for the other application, then use WinExists($title,$text) to monitor, if the other application is still running. Or start it with $PID=run("c:pathtoother-application.exe") and use ProcessExists($PID) for monitoring. Regards, Rudi. Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! 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