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
11
votes
2 answers

How can I pass the intercepted key through to an application in autohotkey

I'm constantly activating Firefox then hitting Ctrl+L to focus the location bar and do a search or type a URL. Ideally I can be in any application and hit Ctrl+L and Firefox will be activated with the location bar focused and ready for input. In…
GollyJer
  • 23,857
  • 16
  • 106
  • 174
11
votes
4 answers

How to make a batch file to run a hotkey

Every time I start my Windows I want to execute a hotkey (Ctrl+Alt+1) using a batch file and putting it in startup folder. Is that even possible? Is there a command for that?
g Void
  • 171
  • 1
  • 2
  • 10
11
votes
3 answers

Syntax Highlighting in Notepad++: How to treat a user-defined language as built-in?

This is a very minor issue that has nonetheless annoyed me for months. I've spent hours Googling it to no avail. To enable syntax highlighting of .ahk files in Notepad++, I've downloaded & imported an .xml file for AutoHotkey. The issue is that- to…
79-madms
  • 596
  • 1
  • 7
  • 19
11
votes
4 answers

Detect what 'button' is pressed

I just started using autohotkey and I already got 1 question: Is there a way to detect which button is 'pressed' without listing any keys that it should look for? As in, detect ANY button pressed. The reason I want this is because I'm trying to…
MrSoundless
  • 1,246
  • 2
  • 12
  • 34
11
votes
1 answer

autohotkey partial window title match (without ahk class)

I would like to add partial window title matching to #IfWinActive. For example to match any notepad window, regardless wether the title is "Untitled - Notepad" or "MyFile - Notepad" This should be very simple. My attemtps: SetTitleMatchMode,…
Nino van Hooff
  • 3,677
  • 1
  • 36
  • 52
10
votes
2 answers

Autohotkey window appear event

I'm using WorkRave rest reminder and want to turn off my screen when the rest window appears. I know how to turn it off. How create an event when specified window (#IfWinActive ahk_class ...) appears? Also, can i bind % symbol? {%} doesn't work,…
Roman Malieiev
  • 205
  • 4
  • 10
10
votes
1 answer

Playback 24bit audio not possible

I'm trying to play a 24bit audio file with my AutoHotkey app. It just uses SoundPlay. Windows 7 has no problem, however Windows XP users cannot play the 24bit files. The documentation says: All Windows OSes should be able to play .wav files.…
svandragt
  • 1,672
  • 20
  • 38
10
votes
5 answers

AutoHotkey causing control key to get stuck

I have several situations when my control key gets stuck, and it happens only when I have AutoHotkey running. This happens with multiple different modifier keys including the control (^), windows (#), and alt (!) keys. Similar problems have been…
Stenemo
  • 611
  • 7
  • 13
10
votes
2 answers

Multiple Cursors in Autohotkey

Is there any way in Autohotkey to mimic multiple cursors like in sublime. I need a hotkey that sends and couple of text lines and leaves me with multiple cursors so I don't have to type the same text over and over. Like in the gif below. Thanks xD.…
IGRACH
  • 3,506
  • 6
  • 33
  • 48
10
votes
1 answer

Why can my AutoHotkey script only type some emoji?

I have set up a small AutoHotkey script that uses hotstrings to allow me to type a few emoji and other special characters: #SingleInstance force #Hotstring *…
fefrei
  • 885
  • 1
  • 10
  • 27
10
votes
2 answers

Python for Autohotkey style key-combination sniffing, automation?

I want to automate several tasks (eg. simulate eclipse style ctrl-shift-R open dialog for other editors). The general pattern is: the user will press some key combination, my program will detect it and potentially pop up a dialog to get user input,…
Parand
  • 102,950
  • 48
  • 151
  • 186
10
votes
5 answers

How to insert a line break in Autohotkey message box text

Is it actually possible to insert a line break in a message box text? I have searched far and wide and everybody talks about 'n or \n but that does not work. Can anyone give me an example of code that actually works?
user2157155
  • 167
  • 1
  • 2
  • 6
9
votes
2 answers

Get available screen area in autohotkey

I'm trying to write a few simple AutoHotkey scripts for moving windows around, and I'm having trouble getting the correct screen size values. I'm trying to get the size of the usable area on the screen (generally the full screen resolution minus the…
Herms
  • 37,540
  • 12
  • 78
  • 101
9
votes
1 answer

Binding some global hotkeys fails on Windows 10

I'm a longtime Windows user who really likes to customize his Windows with lots of different utilities (some written by myself in Python) and AutoHotKey scripts. These all use global hotkeys for their functionality. I was recently forced to upgrade…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
9
votes
6 answers

Autohotkey script to open command prompt

I've collected a script from the AutoHotKey forum which lets me open a command prompt at the location I'm open in windows explorer. If the current window is not a explorer window then the prompt opens at the location where the script is present. I…
Soham Dasgupta
  • 5,061
  • 24
  • 79
  • 125