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

3938 questions
104
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.
  • 25,666
  • 9
  • 69
  • 87
85
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
  • 67,996
  • 36
  • 114
  • 164
44
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
  • 34,313
  • 9
  • 36
  • 30
42
votes
11 answers

What is the best editor for AutoHotkey?

What is the best editor for Autohotkey with regards to syntax hightlighting, command completion (intellisense), testing etc. I am doing a bit of Autohotkey programming, and being spoiled rotten by Visual Studio, I really miss these features -…
Kjensen
  • 11,451
  • 33
  • 95
  • 150
35
votes
2 answers

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
  • 16,510
  • 19
  • 94
  • 173
34
votes
4 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,123
  • 15
  • 52
  • 76
32
votes
5 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
  • 16,510
  • 19
  • 94
  • 173
30
votes
4 answers

How do I use Unicode 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…
Eamon Moloney
  • 1,723
  • 4
  • 18
  • 22
28
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
  • 3,807
  • 8
  • 27
  • 53
27
votes
2 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
  • 11,495
  • 11
  • 84
  • 122
22
votes
2 answers

What happens 'behind' the windows lock screen?

I have been working on windows automation and monitoring. What exactly happens when I lock the screen of a windows machine? I am working with Windows 7 at the moment, are there big differences to the behavior if I switch to Vista or the server…
Plastefuchs
  • 417
  • 1
  • 4
  • 10
22
votes
11 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
22
votes
5 answers

AutoHotkey in Windows 10 - Hotkeys not working in some applications

A simple script like a::msgbox hi! used to work fine under Windows 7. Now that I upgraded to Windows 10, it isn't working when certain windows are active. Specially LButton-Hotkeys can mess up everything, leading to the situation where you actually…
phil294
  • 8,501
  • 7
  • 55
  • 84
21
votes
8 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
  • 16,510
  • 19
  • 94
  • 173
21
votes
6 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,391
  • 1
  • 13
  • 21
1
2 3
99 100