Now.....
The problem is, when I set this in a timer, every time the timer updates, all programs is stopped, but then started again..
What I want to do is I want my program to update only when a new program is opened or closed.