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

Send Text in Clipboard to Application like Notepad (C# or Powershell)

I want to be able to send the text on the clipboard, in Windows, to an application. For example, I'm working on a text file in notepad, and I want to copy a portion out into a new file..I want to copy it to the clipboard and then use a hotkey to…
ctorx
  • 6,841
  • 8
  • 39
  • 53
5
votes
4 answers

Autohotkey: Send 5 digit hex unicode chars

I have been trying to find a way to remap my keyboard and send 5-digit hex unicode chars, the method described here: ahk Send only supports 4-digit hex codes {U+nnnn}, I know that in the past, autohotkey didnt support unicode natively so it was…
5
votes
3 answers

Autohotkey - capture extra mouse buttons

Can autohotkey capture nonstandard mouse buttons? I use a five-button mouse (Microsoft Wireless Laser Mouse 6000).
Kimball Robinson
  • 3,287
  • 9
  • 47
  • 59
5
votes
3 answers

How can I change the keys to change desktop in windows 10 with autohotkey?

Windows 10 has finally multi desktops, you can switch desktops with ctrl+win+right (or left) keys. It's a nice feature, but you have two use two hands to switch desktops. I'm trying to map the keys like this with autohotkey so I can use just one…
Fabman
  • 333
  • 5
  • 20
5
votes
2 answers

Find and fill an input field with AutoHotKey

A challenge to all you AutoHotKey masters: Give us a function that will Find and Move the Cursor to an Input Field (E.g. LoginName) and, alternatively send input text. For the old, lazy hackers like myself just fiddling with AHK, it would look like…
user478094
  • 87
  • 2
  • 3
5
votes
2 answers

AutoHotKey infinite while loop

Is there a way to create something like this in AutoHotKey? bool isReady = false; while (!isReady) { // Do something here isReady = true; } I tried to experiment with While loop, but it ended with just 1 loop regardless of the condition I…
George
  • 4,514
  • 17
  • 54
  • 81
5
votes
2 answers

AHK sending a key held in a variable "down"

I want to send a key which is held in a variable down. The reason it is held in a variable is because I use a gui for the user to input the key in question. Currently this works: Send %hotkey% But this doesn't: Send {%hotkey% down} How can I make…
Paul Chambers
  • 311
  • 1
  • 6
  • 13
5
votes
3 answers

Substitute AltTab in one key

Is it possible to substitute AltTab with only one key press ? i tried this one but it doesn't work `::AltTab
albator
  • 859
  • 1
  • 10
  • 18
5
votes
5 answers

AutoHotKey: InputBox with multiline input

In AutoHotKey, I want to have something like InputBox except that the text input is multiline. (i.e. like a textarea). I want there to be two buttons, "Ok" and "Cancel", and I want them both to have accelerators. I want this code to be in the form…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
5
votes
1 answer

How to open "Devices and Printers" Control Panel in Windows 8 via CLI or AHK?

I would like to automate connecting PC to phone's internet connection via Bluetooth using the AutoHotKey script which will perform the following actions: Once the Devices and Printers window is open, I should be safely able to finish most of…
miroxlav
  • 11,796
  • 5
  • 58
  • 99
5
votes
6 answers

Toggle a key with hotkey in autohotkey

So I tried to automate running in a game, where the map is huge, and I have to run miles. I wanted to toggle on the hotkey (Ctrl+Shift+A or something else) press the running (in the game, I can run with w). I tried code, like: Pause On Loop Send…
András Geiszl
  • 966
  • 2
  • 16
  • 36
5
votes
1 answer

Using AutoHotkey to click a button within a window

I want to make an AutoHotkey script to change the font in the PuTTY SSH client. (I prefer a small font for high information density, but when I'm showing something to a coworker, they need to be able to see it clearly.) I've gotten this far: #NoEnv …
Robert
  • 91
  • 1
  • 1
  • 9
5
votes
2 answers

AHK: Unpress All Pressed Keys

Is there a way to unpress all pressed keys with AHK? By pressed, I mean Send {something down} and by unpress I mean Send {something UP}
RainingChain
  • 7,397
  • 10
  • 36
  • 68
5
votes
1 answer

AutoHotKey: Getting the last key that was pressed

I'd like to get the last key that was pressed by the user. I'm not talking about a hotkey; just a normal keypress. If possible, I'd also like to have keys that AHK typed using SendInput be included. So if AHK just did SendInput for some keys, and…
Ram Rachum
  • 84,019
  • 84
  • 236
  • 374
5
votes
1 answer

How do I use autohotkey to create a new text file by right click -> New -> New text document?

I want to create a new text file by right click -> New -> New text document using AutoHotKey. How do I do this? I am new to AutoHotKey. Edit: Using Autohotkey, you can assign shortcut for some tasks such as running a particular program like…
TheRookierLearner
  • 3,643
  • 8
  • 35
  • 53