4,718 questions
111
votes
7
answers
99k
views
Choosing a Windows automation scripting language: AutoIt vs AutoHotkey [closed]
I need to choose a Windows automation scripting language. Which one do you recommend; AutoIt, AutoHotkey or some other?
I have read "An AutoIt / AutoHotkey comparison". Interesting history, ...
57
votes
8
answers
66k
views
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 ...
50
votes
8
answers
57k
views
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 ...
36
votes
6
answers
18k
views
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 ...
30
votes
3
answers
23k
views
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 ...
29
votes
9
answers
13k
views
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 ...
28
votes
16
answers
47k
views
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 ...
25
votes
3
answers
18k
views
How to map caps lock to ESC in AutoHotkey?
How to set up AutoHotkey so that when I press the Caps Lock, it will instead send the ESC key to the computer?
24
votes
2
answers
29k
views
What is ahk_class? How can I use it for window matching?
The AutoHotkey Beginner Tutorial includes a sample script to demonstrate window specific hotkeys and hotstrings.
#IfWinActive ahk_class Notepad
::msg::You typed msg in Notepad
#IfWinActive
#...
23
votes
6
answers
41k
views
How to get the active window's title with AutoHotKey?
I wrote this short test code, but it didn't work. What am I doing wrong?
F12::
WinGetTitle, Title, A;
MsgBox, "%Title%"
The displayed result was ""
22
votes
5
answers
38k
views
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 ...
21
votes
4
answers
17k
views
How can I simulate the Windows Key in Autohotkey
I have an old IBM Model M from 1994. It's awesome, but it doesn't have a Windows key. I'd like to use AutoHotkey to map the combination of Ctrl + Alt to simulate the Windows key in order to take ...
20
votes
6
answers
30k
views
Autohotkey alternative for Mac OS X? [closed]
This question has been asked before but with no answer. I'm running into brick walls with google too. Program can either be free or paid.
19
votes
11
answers
43k
views
FULLY ADDRESSED Any way to toggle between local desktop and AWS Workspace in full screen view using code or a script? [closed]
FULLY ADDRESSED for AWS Client on Windows under:
version 5.26.0 March 4, 2025
[Windows only] Added a Ctrl+Alt+DownArrow keyboard shortcut to help users navigate from the client application to their ...
18
votes
4
answers
20k
views
Global variable does not have global scope
supposedlyGlobalVariable := "blah"
ARoutine()
{
localVariable := "asdf"
MsgBox, The global variable value is %supposedlyGlobalVariable%. The local variable value is %localVariable%.
}
^!X:: ;...
17
votes
2
answers
47k
views
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?
17
votes
3
answers
9k
views
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 ...
15
votes
3
answers
7k
views
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 ...
15
votes
2
answers
30k
views
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 ...
15
votes
2
answers
3k
views
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 ...
13
votes
3
answers
8k
views
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
...
13
votes
5
answers
5k
views
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 ...
12
votes
5
answers
25k
views
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 ...
12
votes
1
answer
11k
views
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 ...
11
votes
2
answers
6k
views
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 ...