The scripts I am using with AutoHotkey macro program for Windows to automate tedious tasks on my computer.
Note
On 2023/12/26, I have moved some scripts (marked with ✴️) into my-espanso-config.
Currently included list of scripts inside My_AHK_Scripts.ahk file:
- Emoji Keyboard Shortcut ← open emoji keyboard with
Right Ctrl
(which triggersWin
+.
keyboard shortcut) - Change text color in Obsidian ← change text font color after highlighting the text and pressing
F12
- This snippet requires defining the following rule within Text Snippets plugin:
q : <font style="color: #858FB1">$end$</font>
- This snippet requires defining the following rule within Text Snippets plugin:
- Special Characters ✴️ ← quickly insert a couple of handy special characters like
•
,←
or€
- French Accents ✴️ ← easily type French accents without the use of a French keyboard layout (physical or digital)
- ✅ The script works in any input field, such as in the browser or the notepad application
- ⌨ For example, you can insert
- ç by typing
,,c
and hittingSPACE
- è by typing
``e
and hittingSPACE
- é by typing
''e
and hittingSPACE
- ê by typing
^^e
and hittingSPACE
- ë by typing
""e
and hittingSPACE
- œ by typing
==oe
and hittingSPACE
.
- ç by typing
- German Accents ✴️ ← easily type German accents without the use of a German keyboard layout (physical or digital)
- ✅ The script works in any input field, such as in the browser or the notepad application
- ⌨ For example, you can insert:
- ä by typing
""a
and hittingSPACE
- ß by typing
==ss
and hittingSPACE
.
- Click the "Next" button inside Rosetta Stone ← script I use to rapidly click the "Next" button in the bottom right corner of the Rosetta Stone web application after pressing
Ctrl
- ⚠ It only works when the browser tab window is titled "Welcome to Rosetta Stone!". You might also need to adjust the
X
andY
coordinates of where the mouse cursor has to click the button. You can help yourself with one of these examples to get the exact cursor position - 🎮 I advise you to use antimicro app to map
Ctrl
to a specific button on your controller (such as the wireless Xbox one), so you can lean back on your chair while studying a new language. The mouse movement and LMB can also be assigned to other buttons on your controller for making it possible to select different answers on your screen. Of course, you only won't be able to complete the exercises that require to type something on your keyboard.
- ⚠ It only works when the browser tab window is titled "Welcome to Rosetta Stone!". You might also need to adjust the
- SoundCloud/YouTube Downloader ✴️ ← autocompletion (hotstring) that I'm using to quickly type a long command inside my terminal to download audio/video
- ⚠ You need to have Python and yt-dlp installed in order for the script to work
- ⚠ It only works in the specified windows: Windows Terminal, ConEmu64 or cmd.exe. Of course, you can extend it by adding more window classes
- ⌨ This script supports the following hotstrings:
yt
followed bySPACE
will autocomplete ayt-dlp
command to which you only have to paste a SoundCloud song link. The downloaded song will include all the metadata with an embedded thumbnailytv
followed bySPACE
will autocomplete ayt-dlp
command to which you only have to paste the YouTube video link. It will use the best possible video quality and write down its thumbnail to a separate fileytm
is similar, but will only download extracted audio in 320 kbps mp3 format.
- Download and install AutoHotkey v2.0 (only available for Windows).
- alternatively, you may want to use the beauty of Python by wrapping AutoHotkey with the Python ahk library.
- Put the AutoHotkey script from this repository inside the installation folder, such as
C:\Program Files\AutoHotkey
.- ideally, save the file with "UTF-8 with BOM" encoding to prevent the output of any weird characters.
- Run the script by double-clicking the file and start saving a lot of time!
- optionally, you can follow these 3 simple steps to make sure that your script runs every time you turn on your PC.
If you are willing to explore the world of automation, here are some resources that can help you on the way:
- AHK documentation ← #1 place to learn what you need
- Intro to AutoHotkey / Windows Desktop Automation (RPA) ← Udemy course to give you a hand to put your first steps
- AutoHotkey Q & A ← quite active Reddit community
- AutoHotkey Plus ← instead of typing your scripts blindly in the notepad, you can get some syntax highlighting inside the VS Code editor.