End screensaver propperly

If you have a question or need help, this is the place to be.
Post Reply
ralphberner
Posts: 3
Joined: Mon Jun 03, 2019 7:18 am

End screensaver propperly

Post by ralphberner » Mon Jun 03, 2019 7:34 am

I use Windows 10 x64.
The only way to stop a screensaver i found up to now is a hard taskkill.
Example: taskkill /im gphoto~2.scr /t /f (for gphotoshow pro here).
With that method, the screensaver is not able to store some values (wich pictures were shown in this case).
I thied triggering keyboard events and mouse events to end it propperly. Nothing worked.
That seems to work if real hardware is opereated only but not with events.
I dditionally tried various third party freewares wich simulate mouse moves and/or key hits.
Is there a way to end screensavers propperly (as if hitting the ESC key for example or moving the mouse).
I read that those things really went bat from Windows 7 to Windows 10.
Thanks for any hints.

User avatar
kgschlosser
Site Admin
Posts: 4652
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: End screensaver propperly

Post by kgschlosser » Thu Jun 06, 2019 2:01 pm

unfortunately screen savers hook the keyboard and mouse at the driver level. and does not listen to windows notifications for mouse and keyboard input unless it is from the driver. I can do some digging to see if we can send a different close message to the program other then a forced shutdown of the screen saver. There are multiple "SIGTERM" messages that can be used. I do not know if a screen saver would react any differently or even at all to any message other then a forced shutdown.

I do know that the movement of a mouse programmatically does wake a monitor up. and maybe this could be the catalyst for getting the screen saver to turn off. It is something you would have to test by setting the power features of your monitor so it will go into standby faster then usual. say <= 1 minute
Set EG to react to the System.Monitor.Off event add a wait in there is 3 seconds. then use the Mouse Move Relative action and have it move the mouse 2-3 pixels. see if this powers on the monitor and also turns off the screen saver. The screen saver could be listening to a monitor power on event to terminate. That is the best I can come up with at the moment.

I am going to look at the screen saver program to see what I can come up with as well.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 4652
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: End screensaver propperly

Post by kgschlosser » Thu Jun 06, 2019 2:18 pm

you may also want to ask on their forums if there is a way to programmatically end the screen saver other then using a forced taskkill

https://www.gphotoshow.com/forums/

explain what happens when you do a taskkill and also tell them you have tried using keyboard emulation via windows messages and also mouse emulation via windows messages but have not had any success.


Before you do this I want you to also try one other thing. Install the process watcher plugin. this is bundled with EG. this is going to produce an event when the screen saver starts. You will want to run the screen saver to get the exact event in EG. add that event to a macro. then add the Find Window action and in the process name entry add in the name of the process. you should be able to see that process name in the event that the process watcher plugin generated. make sure no other fields are filled in. also check off the terminate macro if no windows are found. then after that action add the Send Key action. have it send a space bar press. you may need to add a wait in there after the event of 3 seconds or so. this is so that the screen saver can fully start up.

then start the screen saver and lets see if possibly sending a keystroke directly to the process will make it terminate properly. ya never know. By having the find window action before the send keys action will cause the send keys action to use the window that was found in the find window action instead of just globally sending it.
If you like the work I have been doing then feel free to Image

ralphberner
Posts: 3
Joined: Mon Jun 03, 2019 7:18 am

Re: End screensaver propperly

Post by ralphberner » Sun Jun 09, 2019 10:52 am

I had already been in contact with the author of gphotoshow pro.
Hes snet me the hint with the hard taskkill. He is aware of the problem, but had no better solution.

ralphberner
Posts: 3
Joined: Mon Jun 03, 2019 7:18 am

Re: End screensaver propperly

Post by ralphberner » Sun Jun 09, 2019 10:53 am

I had already been in contact with the author of gphotoshow pro.
Hes snet me the hint with the hard taskkill. He is aware of the problem, but had no better solution.

Post Reply