View Full Version : Display OSD message while an application is closing?

April 7th, 2006, 02:07 PM
This seems like it would be really trivial to set up, but I just can't seem to figure it out (haven't touched Girder in ages).

What I want to do is to hit a button on my remote and have Girder send an "exit" command to a running application, wait for it to fully close, and then restart it. The application in question will close all of its windows, but it's process will stay in Task Manager for up to 30 seconds (and sometimes longer) before finally fully closing. If I attempt to restart the app while the task is still running, nothing happens, so I need to wait for it to fully close before restarting it. I also, really don't want to set a minute long Wait command just to be sure it's fully closed. I'd much rather have Girder just detect when it's closed and then move on.

While this is happening, I'd like to have an OSD display that just says something like "Please Wait" or whatever, which will then fade out once the app has fully closed and Girder restarts it.

I got it working by issuing the Exit command, then having Girder show the OSD, then use a 1 second timer that checks if the process exists, then when it doesn't it kills the timer and the OSD. But is there an easier way?

April 7th, 2006, 02:22 PM
you need to use a timer to check if the process exists. this may not work if the window is destroyed. G4 includes a function that lets you monitor the processes directly.