Unable to get Task Scheduler to engage Autohotkey script for Monochrome toggle?

Tom Files 20 Reputation points
2024-07-18T07:29:42.8966667+00:00

Hi all

So I have been trying to set up Task Scheduler to run an Autohotkey .ahk script that toggles to Monochrome mode by sending Windows+Control+C.

However the task that I have created does not seem to run the script.

I have run the script manually (by double clicking) and it works, so it can only be the Task Scheduler, or how I am linking the script to the task.

I have included a screenshot of all the different settings as well as the autohotkey script.

Image

Image

Image

Image

Image

Image

Image

Image

Image

Background info:

-I am using a Lenovo Thinkpad T495

-I have Windows 11 installed (which was updated from Windows 10 last November 2023)

-At current, when I check the last run log, it states a result of "0x41301"

-On the "General" tab, where it states "Confgure for" at the bottom, I have used "Windows 10", as there is no option for Windows 11

Would really appreciate some assistance on this.

Tom

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
9,835 questions
0 comments No comments
{count} votes

Accepted answer
  1. MotoX80 34,346 Reputation points
    2024-07-19T00:46:26.98+00:00

    Set the task to "Run only when user is logged on."

    Here is a post that describes how to run an AutoHotKey script with the task scheduler.

    https://www.autohotkey.com/boards/viewtopic.php?t=97762

    Since this process is running at user logon time, there may be other programs initializing that could affect it. In "Advanced settings", you may need to play around with setting the "Delay task for" timeframe to allow other apps time to run.

    What is "Cold Turkey Blocker" and what does that have to do with running an Autohotkey script? Your task needs to run the Autohotkey executable and pass it the file name of your script as an argument.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.