With a simple trick, you can run AutoHotKey script at Windows system startup. It is pretty easy to do. Follow the below steps to launch AutoHotKey script at system startup.
AutoHotKey is one of my favorite software. I have a fair number of custom shortcuts to make my life a tiny bit easier. For example, one of the main ways I use AutoHotKey is to repurpose unused keys on my keyboard, like the function keys.
To get most out of AutoHotKey script, running it at the system startup is essential. This eliminates the need to manually run the script and gives you instant access right from the get-go.
So, in this quick guide, let me show you how to run AutoHotKey script at system startup in Windows.
There are two different ways to do it. The first method is quite easy to follow and the second method is useful if you like to use the task scheduler to manage things.
Note: I assume that you already have an AutoHotKey script ready.
Add AutoHotKey Shortcut to Startup Folder
Windows has a special folder called Startup where you can add application shortcuts that you want to start with the system. The only catch is that you need to add the application shortcut rather than the full exe file. Let me show you how it's done.
1. First, we need to create the shortcut of the AutoHotKey script. To do that, find the AutoHotKey script you would like to add to the startup, select it, hold the Alt key and drag and drop it in the same folder/directory.
2. The above action will instantly create a shortcut of the script. If you want to, you can remove the ".ahk - shortcut" suffix from the shortcut name.
3. Once you have the shortcut, copy it. We are going to paste it in the startup folder.
4. Now, press Win + R to open the Run dialog box. Here, type the shell command
shell:startup and click on the "Ok" button.
5. The above action will open the startup folder. Press Ctrl + V to paste the copied shortcut file. You can also drag and drop the shortcut file into the startup folder.
That is all. From now on, the AutoHotKey script will automatically start with Windows. You no longer have to manually launch the script.
Create a Scheduled Task to Run AutoHotKey at Windows Startup
If you like to use task scheduler to start your applications, you can do the same thing with the AutoHotKey script. This is especially useful if you want to delay start program.
1. First, open the start menu, search for "Task Scheduler" and click on the result to open the Task Scheduler.
2. On the right panel, select the "Create Basic Task" option.
3. Name the task anything you want and click "Next".
4. Select "When I log on" radio option and click "Next".
5. Here, select "Start a program" radio option and click "Next".
6. In the "Program/script" field, enter the following file path. In the "Arguments" field, enter the AutoHotKey script file (.ahk) path.
Note: If you've installed AutoHotKey in some other location, modify the below path accordingly.
7. Review your settings and click on the "Finish" button to complete the task creation process.
8. Finally, find the newly created task, right-click on it and select "Run" and see if the task runs successfully. If it did not run as expected, review the steps.
That is all. From now on, the AutoHotKey script will run on schedule according to your settings.
As you can see, it is pretty easy to run AutoHotKey script at Windows startup. If you are stuck or need some help, comment below and I will try to help as much as possible.