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

Does Autohotkey have a 'test my script' feature?

I asked a question about an Autohotkey script I am using for emacs (in Cygwin) to remap the Ctrl and Alt keys. Here is the question: https://stackoverflow.com/q/15899963/1243435. One way I have been testing my script is to open up emacs and use the…
Robert
  • 1,530
  • 1
  • 16
  • 24
5
votes
3 answers

How can I declare a variable within a hotstring in AutoHotKey?

I'm trying to create a script that will take a name and add it to a pre-written block of text. Essentially, I want to write "emailDave" and have the name Dave inserted into a string of text that is then sent. I'm just not sure how to modify a…
Zach G
  • 53
  • 1
  • 3
5
votes
2 answers

Send existing modifiers with a key in autohotkey?

I'm trying to send pressed modifiers with the Send command, only way I come up with is listing them all: ; (Note: I've remapped using registry the Capslock as F13) F13 & h:: if GetKeyState("Control") && GetKeyState("Shift") { Send…
Ciantic
  • 6,064
  • 4
  • 54
  • 49
5
votes
3 answers

How to exit program using autohotkey?

I am using autohotkey to do some automate process. I need help with closing chrome.exe I tried Process, Close, chrome.exe ; or Run taskkill /im chrome.exe but it give me chrome crashed error when I start it again. Thanks
Mowgli
  • 3,422
  • 21
  • 64
  • 88
5
votes
9 answers

Relief from backslash irritation in R for Windows

Early in my R life I discovered the pain of R and windows being on different pages when it came to the separator between directories and subdirectories. Eventhough I know about the problem, I am still pained by manually having to put a backslash in…
Farrel
  • 10,244
  • 19
  • 61
  • 99
5
votes
3 answers

AutoHotKey Global Variable that can be accessed and modified by different macros?

I've seen a similar topic on sof but its solution did not help me. This is ticking my mind and basically all i want is to have some method of accessing and modifying a value that will maintain its last changed state through out my macros in my…
matiszac
  • 115
  • 2
  • 11
5
votes
1 answer

AutoHotKey strange issue with Copy (Ctrl-C) every other execution

I'm new to writing my own AutoHotKey scripts so this just has to be something stupid I'm missing here. The intent of the script is for the user to select some text and press the hot-key (Win-W). The menu pops-up and they click the menu item. The…
kman
  • 2,184
  • 3
  • 23
  • 42
4
votes
1 answer

Autohotkey Fn key remapping on Logitech k750 keyboard

I've googled, read forums but unsucceed in this. Tried "Mystery of the Fn key" http://www.autohotkey.net/~daonlyfreez/tutorials/3p/Veil/fnkey.htm But stucked at AutoHotkeyRemoteControlDLL.ahk, that doesn't react on my Fn key on all devices (1-5 HID,…
Roman Malieiev
  • 205
  • 4
  • 10
4
votes
3 answers

AutoHotkey background clicking and typing

I'm trying to use AutoHotkey to do some background clicking and typing while I'm doing other stuff in the foreground. I've gotten used to Send but I haven't figured out how ControlSend works yet. Can anyone give me an example using something simple…
Matthew
  • 837
  • 3
  • 18
  • 33
4
votes
2 answers

An abbreviations list for AutoHotKey

The wonderful AutoHotKey allows you to auto-expand abbreviations as you type them. So you could have an .ahk script with many abbreviations like this: ::btw::by the way ::iirc::if I remember correctly The problem is, I don't feel like writing out…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
4
votes
0 answers

Unmatched Combo prefix KEYDOWN/KEYUP detection and recover, how to?

I am facing a subtle problem, on Autohotkey 1.1.36. Please see this Esc1.ahk : ~Esc & 1:: Esc1() Esc1() { static s_count := 0 s_count++ tooltip, % "Esc1 #" s_count } The purpose of this script is: When I press combo-key Esc & 1, a…
Jimm Chen
  • 3,411
  • 3
  • 35
  • 59
4
votes
1 answer

How to use menu windows key in autohotkey?

I am searching and searching. Please tell me is it possible to use menu windows key (location: next to right alt). Found: AppsKey - this is the key that invokes the right-click context menu. Thanks for advance. Thx for a help. ;)
deadfish
  • 11,996
  • 12
  • 87
  • 136
4
votes
1 answer

Why does switching desktops with AutoHotKey make my taskbar icons highlight orange?

I am yet to find a method to switch desktops that doesn't result in the taskbar icons highlighting orange. e.g. the following script wreaks this havoc on my taskbar ^#Right:: send, ^#{Right} return ^#Left:: send, ^#{Left} return What methods are…
smdanjm
  • 41
  • 1
4
votes
1 answer

Change volume using mouse scroll wheel over taskbar with multiple monitors

I use the AutoHotkey script below which allows me to change the volume using my mouse scroll wheel when hovering over the taskbar in Windows 10. However, this only works on the monitor that is selected as the "main display". I have multiple displays…
Ryan Buening
  • 1,559
  • 2
  • 22
  • 60
4
votes
2 answers

How to start a program if not already started, put on focus if already started?

I would like to make a ahk script to start apps if they are not currently started and maximize them if they are. Is it possible using AHK ? CapsLock & w:: Run firefox.exe Return Something like this but make it so that if I press CapsLock & w…
timond
  • 43
  • 3