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
17
votes
3 answers

Using auto hotkey to swap Ctrl & Alt and implement Ctrl Tab

While using AutoHotKey I wanted to setup a rule to swap the left alt and left ctrl. I can do this by doing: LAlt::LCtrl LCtrl::LAlt I then wanted to keep the 'alt tab' functionality bound do those physical keys, thus I tried LCtrl &…
whomba
  • 387
  • 5
  • 13
16
votes
2 answers

How do I create a standalone exe with AutoHotkey?

I have created a script to remap the Windows Button to right-mouseclick. How can I create an executable AutoHotkey file that I can offer for download, that automatically runs only that script?
rubo77
  • 19,527
  • 31
  • 134
  • 226
16
votes
3 answers

Holding down the left mouse button in AutoHotkey

I want a script where pressing F1 makes AutoHotkey hold down the left mouse button. I then want the script to release the mouse once I press the key again. How can I do that?
Pizza Overflow
  • 277
  • 1
  • 3
  • 11
15
votes
3 answers

AutoHotKey: Calling one script from another script

I just discovered AutoHotKey and it seems like a dream come true. I have two .ahk scripts, A.ahk and B.ahk. I want to call script B from within script A. The AHK forums are strangely silent on the subject but I am sure this is possible.
Abbas
  • 6,720
  • 4
  • 35
  • 49
15
votes
2 answers

How can I mimic Visual Studio's "Ctrl-K, C" two-step macro behaviour using Autoit / Autohotkey?

I'm trying to set up AutoHotkey macros for some common tasks, and I want the hotkeys to mimic Visual Studio's "two-step shortcut" behaviour - i.e. pressing Ctrl-K will enable "macro mode"; within macro mode, pressing certain keys will run a macro…
Dylan Beattie
  • 53,688
  • 35
  • 128
  • 197
15
votes
1 answer

What does an asterisk mean at the beginning of an AHK script's line?

I'm trying to modify an AHK script I like but don't quite completely understand. What does the asterisk mean at the beginning of this line of script? *capslock:: Does the pair of colons at the end mean this line is only part of the statement? Does…
lance
  • 16,092
  • 19
  • 77
  • 136
14
votes
7 answers

Up/Down Key not working in Onenote 2016 for Autohotkey

I mapped alt+i/k to Up/down key using Autohotkey, with the following code: !i:: Send {up} !k:: Send {down} These remappings work with every application except Onenote 2016. I checked it online and found some discussions in the following…
Jason
  • 1,200
  • 1
  • 10
  • 25
14
votes
2 answers

Autohotkey: Paste/write a simple line of text with a keyboard shortcut?

This is a super simple thing I am trying to get my head around I want to use something like WINKEY + ALT + C to paste ** - words** so that I can sign-off my posts or whatever using the three-key combo
user3045055
  • 143
  • 1
  • 1
  • 5
13
votes
0 answers

Change Monitor Input Source

I want to change my monitor input source with AutoHotkey, and I have this partially working. However when I use the hotkey to change the Monitor Input Source to my xbox(YPbYr) from pc(DVI), the monitor doesn't detect that the xbox is on, it says no…
Lifeweaver
  • 986
  • 8
  • 29
12
votes
4 answers

Mapping Caps Lock to Control from within Emacs on Windows

When reading either of these questions or the EmacsWiki article about mapping Caps Lock to Control in emacs in Windows, the best answers seem to involve the registry. My question is what a user can do when they can't modify the registry of the…
Brendan Foote
  • 1,378
  • 2
  • 12
  • 22
12
votes
3 answers

How to emulate hyper key in Windows 10 using autohotkey

I'm migrating my mac workflow to Windows. One thing I couldn't live without is hyper key which is combination of Ctrl + Option + Shift + Cmd. I use Karabiner app to remap Capslock to this Hyper key. I have heard that Autohotkey is an Karabiner…
babygau
  • 1,551
  • 18
  • 27
12
votes
7 answers

Make AutoHotKey ignore Alt as menu key

I'm trying to use autohotkey to simulate elements of Mac keyboard on a PC (Windows) keyboard. My muscle memory reaches for the Command key for simple tasks like copying and pasting, so I'd like to remap the left alt+letter key combinations to…
ttarchala
  • 4,277
  • 2
  • 26
  • 36
11
votes
6 answers

How can I get the current browser URL with an AutoHotKey script?

I'm looking for a way in AutoHotkey to put the currently visited url in a variable. The goal of this AHK is to trace what I've been doing during the day to log my hours better. I have another system which I use to clock my work, but sometimes I…
masterdam79
  • 113
  • 1
  • 1
  • 7
11
votes
3 answers

Communicating between Autohotkey and python

Is there a way to send some parameter from autohotkey to python. Using Autohot key I read some number from the notepad and store in a variable and now I want to send this number to the python code in order to do some calculations. My Autohotkey…
Rohita Khatiwada
  • 2,835
  • 9
  • 40
  • 52
11
votes
3 answers

How can I lock my computer with AutoHotkey?

I'm trying to bind "Esc" key to lock my computer with AutoHotkey. Manually pressing Winkey + l will lock my computer, but it doesn't work in my AutoHotkey script. esc:: MsgBox Going to lock Send, #l Return I have tried multiple other…
n0tis
  • 750
  • 1
  • 6
  • 27