Questions tagged [autohotkey]

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Microsoft Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language.

AutoHotkey (AHK) is a free, open-source macro-creation and automation software for Microsoft Windows that allows users to automate repetitive tasks. It is driven by a scripting language that was initially aimed at providing keyboard shortcuts, otherwise known as hotkeys, that over time evolved into a full-fledged scripting language.

AutoHotkey can be used to:

  1. Automate almost anything by sending keystrokes and mouse clicks. You can write a mouse or keyboard macro by hand or a macro recorder.
  2. Remap keys and buttons on your keyboard, joystick, and mouse.
  3. Create hotkeys for keyboard, joystick, and mouse. Essentially any key, button or combination can become a hotkey.
  4. Automate almost any kind of GUI.
  5. Retrieve and change the clipboard's contents.
  6. Opening programs, documents, and websites with simple keystrokes.
  7. Monitoring a system and automatically opening wanted and closing unwanted programs.
  8. Scheduling an automatic reminder, system scan, or backup.
  9. Creating text replacement task or automatic spelling corrections.
  10. Convert any AHK script into an executable file that can be run on computers where AutoHotkey is not installed.
  11. Create simple GUI tools.

AutoHotkey also has a very friendly and helpful community.

Resources

4574 questions
110
votes
7 answers

Choosing a Windows automation scripting language. AutoIt vs Autohotkey

I need to choose a Windows automation scripting language. Which one do you recommend; AutoIt, AutoHotkey, or an other? I have read "An AutoIt / AutoHotkey comparison". Interesting history, but without recommendation. Searching Google leaves around…
PA.
  • 28,486
  • 9
  • 71
  • 95
93
votes
4 answers

Why is visual studio catching key events before autohotkey?

I recently switched to the Dvorak keyboard layout as a bit of an experiment. One of the most difficult parts of the transition has been dealing with hot-keys. Most hot-keys are designed with QWERTY in mind and, to make matters worse, hot-keys seem…
Dane O'Connor
  • 75,180
  • 37
  • 119
  • 173
50
votes
8 answers

How do I stop an active AutoHotkey script?

Yesterday while debugging my AutoHotkey script, I accidentally triggered an endless loop of MouseMove and MouseClick events. Every 0.5 seconds my mouse would click random parts of the screen. After unsuccessfully trying to terminate AHK with the…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
50
votes
7 answers

How to globally map AltGr key to Alt key?

I want my AltGr key to behave exactly like left Alt. Usually, I do this kind of stuff with Autohotkey, but I'm open to different solutions. I tried this: LControl & RAlt::Alt And Autohotkey displayed error about Alt not being recognized…
Tomas Sedovic
  • 42,675
  • 9
  • 40
  • 30
46
votes
8 answers

How to build AHK scripts automatically on startup?

Each time I restart my computer, I have to rebuild all my AHK Scripts so the keyboard shortcuts will work. For instance, I have a script that assigns Ctrl+j to set up an instance of the MEAN stack and open my web site. After restarting my computer,…
Travis Heeter
  • 13,002
  • 13
  • 87
  • 129
45
votes
1 answer

AutoHotkey syntax highlighting in Notepad++

I would like to display syntax highlighting for AutoHotkey .ahk script files in Notepad++. I don't want to manually select a language every time I open an AHK script. I want language-specific syntax to be applied automatically when the file is…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
34
votes
5 answers

AutoHotKey key SEQUENCE, not just single-key hotkey

I'm not stupid... really. How do you map a key SEQUENCE (ie: Ctrl + Q , F) in AutoHotKey. I've got Ctrl + Q down: ^q:: I've even got F: f:: The examples in the help files even show how to do two keystrokes in a row: Numpad0 & Numpad1:: But it…
Joshua
  • 6,643
  • 15
  • 55
  • 76
33
votes
5 answers

How do I use UTF-8 in AutoHotKey?

I am trying to make two hyphens trigger a short dash, and three hyphens trigger a long dash; like :*?:---=::— :*?:--=::– except working. Here is where I have gotten to: :*?:11:: SendLevel 1 Send 2 return SendLevel 0 :*?:21::3 this works (11…
Eamon Moloney
  • 1,853
  • 4
  • 19
  • 22
29
votes
5 answers

Hotkey for next song in Spotify

After March 2015 upgrade of Spotify the below hotkey no longer works to get next song in Spotify: ; Spotify next track <^>!p:: DetectHiddenWindows, On ControlSend, ahk_parent, ^{Right}, ahk_class SpotifyMainWindow DetectHiddenWindows, Off Return…
EquipDev
  • 5,573
  • 10
  • 37
  • 63
29
votes
3 answers

Detect a double key press in AutoHotkey

I'd like to trigger an event in AutoHotkey when the user double "presses" the esc key. But let the escape keystroke go through to the app in focus if it's not a double press (say within the space of a second). How would I go about doing this? I've…
Matthew Lock
  • 13,144
  • 12
  • 92
  • 130
27
votes
9 answers

Configure Autohotkey to edit scripts with Notepad++

I have my default editor for .ahk files set to Notepad++ Portable on my work laptop, but selecting Edit This Script opens files in the standard Windows Notepad. A post on the AHK forums suggests editing the registry, but I don't see any entries…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
26
votes
2 answers

How do I send a key multiple times in Autohotkey?

I want to write an AutoHotkey script which presses a key X number of times. For example, here's a script which presses Tab 10 times. Send, {Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab}{Tab} While the above solution works, it's a bit unwieldy. Is…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
25
votes
15 answers

What is the right way to send Alt + Tab in Ahk?

Ok. I know this is a very stupid question. But I'm stuck already for an hour. I got very little experience with ahk, however I made work every script until now with no problems. I explored the ahk tutorials but found no solution up to now. I'm…
user5835566
25
votes
9 answers

How To Start Windows Store Apps in AutoHotKey?

Window Store apps are not like the classic Windows apps. The latter usually are installed at clear paths under C:\Program Files. So, AutoHotKey (AHK) scripts can simply run a classic app by "Run" with the path to the app executable. However, it…
Meng-Yuan Huang
  • 1,943
  • 3
  • 19
  • 23
24
votes
4 answers

Easy-to-use AutoHotkey/AutoIt alternatives for Linux

I'm looking for recommendations for an easy-to-use GUI automation/macro platform for Linux. If you're familiar with AutoHotkey or AutoIt on Windows, then you know exactly the kind of features I need, with the level of complexity. If you aren't…
Xeddy
  • 249
  • 1
  • 2
  • 3
1
2 3
99 100