AutoHotkey In Easy Way
- 4 minsWorking Smarter, Not Harder is one of the most important aspects of daily job.
And in order to help you with that, I’ll introduce you to one of the most crucial yet sometimes overlooked keyboard functions.
Therefore, you can save time using this function even if you are a regular user or work as a developer or programmer and have common syntax, or if you work in marketing and write a lot of emails every day.
You may create shortcut keystrokes with AutoHotKey, a free program.
First and foremost, you must download the program from this page.
Second, you need an editor or IDE to create or edit new scripts, and SciTE is among the easiest to use.
So, I`ll suppose you already download and installed those two tools. I’m going to assume that you have already downloaded and set up those two tools.
The first step is to build your first script by doing a simple right-click and selecting New AutoHotKey from the context menu, as demonstrated below.
The new file with the extension “.ahk” will be created in this phase. To edit it, right-click on it. SciTE will be the default editor, and it already contains some text.
The next crucial action you must take is to add the following two lines:
- The first one will ensure that the software doesn’t execute multiple AutoHotKey scripts concurrently.
- The second is to continue running the script even after making a few keystrokes, as the default behavior is for the script to terminate itself after executing a single command.
In order for this script to execute on every Windows logon, you must now place it in a well-known folder and leave it there. We will create a shortcut to this file and copy it to the Windows Startup folder.
Using the run command (Windows key + r), open the Startup folder directory, type shell:startup, and then paste the script there.
As a result, up to now, we have only prepared the tool—not created any hot keys.
Now that we know when to create new hot keys utilizing (Ctrl, Shift, and alt), we need to develop some tips to help us remember.
;~ ! Alt key
;~ # windows key
;~ + shift key
;~ ^ control key
As you can see, I marked it as a comment by using a semicolon.
For the time being, we must create the first hot key, which will specify the hot key to launch the script each time we need to examine or update the code.
My own hot key that I use for that is
^e::Edit ;This will edit the script.
Next, you must use (Ctrl + s) to save the script after making any changes.
Furthermore, in order for the modifications to take effect, we must reload the script; therefore, we will also build a hot key for that reason.
^r::Reload ;This will reload the script.
We were then prepared to create our own hot keys.
I’ll give you two examples to get you started, but you can also create your own or look through the autohotkey manual to see what else this program can do for you.
Assume that we need to create a hot key for my daily emails, which I write on several platforms and forms.
:o:ema::[email protected] ; the "o" between colon prevent space after sentence.
Now, it will look like this if I have a sentence that needs to be written and it involves symbols.
:or:thx::It`s okay, I appreciate your time.
As you can see, I added two characters (o to prevent creating whitespace after the last word and r to include any symbol) between the first colon. This is a necessary addition if you write syntax as a programmer.
As you can see, I added two characters (o to prevent creating whitespace after the last word and r to include any symbol) between the first colon. This is a necessary addition if you write syntax as a programmer.
We have now reached the conclusion; if you need any additional assistance, view the documentation by clicking this link