Start/stop screensaver from TCC?

May 20, 2008
10,617
81
Syracuse, NY, USA
Is there a built-in way to start THE (or any) screensaver? Start\Run will start SCRNSAVE.SCR (et al.); so will SHELLEX (plugin wrapper for ShellExecuteEx).

How about stopping a screensaver? In Windows 7, "KEYSTACK Esc" or a program generated mouse click (SendInput) will stop the screenvaver. Neither will do so in Windows 10 (but either of those will wake up a power-saving monitor).
 
Oct 18, 2009
348
17
Does anybody even *use* a screensaver anymore?
Assuming the answer is yes (and I don't know whether that's the case), a related question would probably be, "How many people who are likely to regularly use TCC or TCC-RT would be likely to run a screensaver?"

Admittedly I'm guessing, but probably most folks who frequently interact with TCC are tech-oriented, either programmers, system operators, network admins, etc., or it's TCC-RT running on server farms, etc., and those folks and applications generally would not be using a screensaver, even if the general public might.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,220
78
Albuquerque, NM
prospero.unm.edu
Does anybody even *use* a screensaver anymore?
Lots of people. Of course CRT burn-in is no longer a thing, but (1) a screen saver can automatically lock your session for you, and (2) some are kinda fun.

(And in student labs I often set ye olde Logoff screen saver as the default. It's amazing to me how many people will log into a public computer with their own credentials, and then just walk away when they're finished. Do they forget to log off? Not know how? Can't be bothered? Well, anyway: antique screen saver to the rescue....)
 
May 20, 2008
10,617
81
Syracuse, NY, USA
I don't think anybody has every asked for a screensaver-related feature for the past 25-30 years. I'm having trouble seeing why something like that would benefit from being in the command processor.
With AutoHotKey, PowerPro, and probably others you might be able to assign it to a keystroke (tcc /c start_the_screensaver).

Actually, "scrnsave.scr" works in Powershell.

This is not a request. I have a plugin and an EXE that will do it.
 
May 20, 2008
10,617
81
Syracuse, NY, USA
How about:
Code:
postmsg "=%_pid" 0x0112 0xf140 0
And here, this puts the monitor into power-saving mode (WM_SYSCOMMAND\SC_MONITORPOWER).

Code:
postmsg "=%_pid" 0x0112 0xf170 2
The docs say:

The lParam parameter can have the following values:
  • -1 (the display is powering on)
  • 1 (the display is going to low power)
  • 2 (the display is being shut off)
Here (desktop) 1 does nothing and 2 results in "searching for signal" ... "no signal" ... "entering power-saving mode" ...

The behavior might be different on different devices.