Automatically turn on grayscale mode in windows 10

2

1

I want grayscale mode to turn on at a specific time every day, then turn off automatically a few hours later. I know ctrl + windows + c can be used to do it manually but it would be great to automate the process such as turning on at 9pm and off at 7am for example.

Devin Ersoy

Posted 2019-06-08T13:11:07.050

Reputation: 123

Question was closed 2019-06-23T07:47:29.027

Answers

1

It is possible. You need a tool for sending the keys ctrl+windows+c and a way to schedule this sending. These tools are:

You will need to create a AutoHotkey script to send the key combination, which is a one-liner file with the .ahk extension:

send, #^c

You will need to schedule its execution at the days and times that you wish, using the SCHTASKS command or the Task Scheduler.

You may also disable the hotkey ctrl+windows+c by changing in the registry the DWORD item HotkeyEnabled at the key HKEY_CURRENT_USER\Software\Microsoft\ColorFiltering. Its value is 0 to disable and 1 to enable, and the modification takes effect immediately. You may do so programmatically by either using again AutoHotkey with the RegWrite command, or by using the batch REG command.

harrymc

Posted 2019-06-08T13:11:07.050

Reputation: 306 093

This seems to work to turn on and off grayscale, but is there a way the script can be activated only if it was activated the night before? For example, if the computer was shutdown at 11pm and the script did not activate, then grayscale mode should not activate in the morning (since instead of turning grayscale off it would turn it on if not activated the night before). – Devin Ersoy – 2019-06-09T21:31:08.720

Also, it seems I am getting the error "Script file not found: C:\Users\Username" when running the script via task scheduler. – Devin Ersoy – 2019-06-09T21:49:43.793

1You can modify the script's behavior by various means, for example using the existence of some file as a switch to tell the script to do its work (or not). An error in the task scheduler means bad task definition. – harrymc – 2019-06-10T06:21:07.740

You can use the registry values to check if grayscale is active or not. For example, the following script always turns grayscaling off but never on (for the converse replace the if check by if (not isActive)). ```#NoEnv #Warn SendMode Input SetWorkingDir %A_ScriptDir%

RegRead, isActive, HKEY_CURRENT_USER\Software\Microsoft\ColorFiltering, Active

if (isActive) send, #^c


 – Tobias Diez  – 2019-09-14T13:59:04.743

0

Apparently, Windows 10 doesn't officially support automatic grayscaling depending on the time yet. You can try suggesting that to Windows through the Windows' Feedback Hub.

Hamu XD

Posted 2019-06-08T13:11:07.050

Reputation: 23