Basically after a certain amount of time has passed without mousemoves or keystrokes, I want the application to close and then reopen. I thought maybe writing a script, compiling it and then renaming it with a .scr extension might work. It does sort of. Here are the lines of code:
currentwin = WinGetActive()
WinClose(currentwin)
timedelay(3)
Run("C:\Program Files\Google\Chrome\Application\chrome.exe","")
It closes Chrome fine, but it doesn't open it back up. Actually I think it does for a split second and then closes it again.
Any ideas? Thanks
Jane
If I just run it as an .exe it does start the program.
I'm guessing the problem is that when the screensaver is active, the "normal" desktop is not connected, so your WinClose won't work.
You probably have to "unscreensaver" it (I think this is possible, I just forget how to do it ATM), then do your WinClose.
It does close the window. What it doesn't do is Run Chrome.
Maybe rather than treating the compiled script as a screen saver, try this method instead:http://techsupt.winbatch.com/webcgi/webbatch.exe?techsupt/tsleft.web+WinBatch/Launching~WinBatch~and~Other~Apps+Launch~Exe~after~Period~of~Inactivity.txt