I hope you are having a great day ^,=,^
I was wondering how I would be able to create an executable Batch script or a console app (C#, C++) that would put the monitor into standby mode – to make it behave the same way as if I held the monitor power button turn it off when settings > power button > standby
is enabled. I have two MSI G274QPX monitors (and Asus monitor as my main but I only need to controll the MSI monitors).
When that setting is enabled and I hold the button to “turn the monitor off” only the display turns off while windows sees the display as fully conected (can move my mouse / other windows there like if the monitor was fully on) – This is the ideal behavior I want to achieve via a script.
Why? I have three monitors in total and when I game / watch content I might use only one monitor, or all three of them. And to reduce light emitted by the monitors I’d like to create a macro that launches the script to put one specific monitor into standby so I can controll the 2 extra monitors individually.
Is what I want even possible? In case it is, how could I do that? If it is not, I will explore the alternative solutions explained below myself. Unless you have another suggestion?
My attempts at solving the issue
I was only able to achieve three things when trying to make the script myself:
-
put ALL monitors into standby mode. Turns back on after moving a mouse / pressing a key
- I need only a single specific monitor to go into standby and stay that way until I want it to turn back on
-
Turn the monitor fully off (ControlMyMonitor.exe from Nirsoft)
- I don’t want it to disconnect from windows, to keep all of the apps in place and all that. Not to mention you can’t turn the monitor back on via a script if it is fully off.
-
disable the monitor in windows (MultiMonitorTool.exe from Nirsoft)
- Looked like an acceptable solution at first, except it always messed up the monitor positioning after re-enabling it, needing a manual monitor position adjustment. I suppose I could also manually adjust those via MultiMonitorTool but since the monitor “fully disconnects” (apps that were placed there moved and it takes a little bit for Windows to catch up) I don’t think I want to use this solution.
Alternate route
If what I seek is impossible, I thought of two alternative solutions to achieve similar results.
-
The script would just put a blank black image to the foreground of the screen and reduce the brightness to 1
- Since it is an LCD display backlight will still be on. It’s not terribly bright but I’d like the backlight fully off ideally. “Turning the screen off / on” would be pretty fast so that’s great.
-
Switch monitor input from 7 to 6 (seems to still consider that output to be DP? Numbers apart from 6 7 8 don’t seem to do anything)
- I found out of I switch the input source of the monitor via ControlMyMonitor.exe, it goes fully blank before turning itself back on (input source auto scan is off before you ask). Technically if I would loop sending this command I would achieve what I want. But sending that command every 5 or so seconds seems… wrong. I think I would rather go with the first alternative solution. (plus it takes 10 or so seconds for the image to come back on)
What do you think of those? Or do you have another suggestion? Also if I end up creating one of the alternate solutions would you be interested in that script / console app to use youself?