Skip to content

Instantly share code, notes, and snippets.

@zadykian
Last active October 13, 2024 17:00
Show Gist options
  • Save zadykian/f280d589c50d71599fac2e4b2b780536 to your computer and use it in GitHub Desktop.
Save zadykian/f280d589c50d71599fac2e4b2b780536 to your computer and use it in GitHub Desktop.
ControlMyMonitor Setup
Set WshShell = CreateObject("WScript.Shell")
WshShell.CurrentDirectory = CreateObject("Scripting.FileSystemObject").GetParentFolderName(WScript.ScriptFullName)
displays = Array("\\.\DISPLAY1\Monitor0", "\\.\DISPLAY2\Monitor0")
For Each display In displays
resetCmd = ".\ControlMyMonitor.exe /SetValue " & display & " 04 1"
WshShell.Run resetCmd, 0, True
brightnessCmd = ".\ControlMyMonitor.exe /SetValue " & display & " 10 60"
WshShell.Run brightnessCmd, 0, True
Next
Set WshShell = Nothing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment