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
3
votes
1 answer

What's the difference between AHK_Basic and AHK_L?

I've noticed that some AutoHotkey scripts specify that they were created specifically for either AHK_Basic or AHK_L. From searching AHK questions on Stack Overflow, AHK_L seems to be the more popular variant, with one question asking how to enable…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
3
votes
1 answer

What's the difference between Send and ControlSend?

AutoHotkey's official documentation lists two different sets of commands for sending simulated keyboard input to a window. Send / SendRaw / SendInput / SendPlay / SendEvent Sends simulated keystrokes and mouse clicks to the active…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
3
votes
1 answer

VK vs SC keycodes in autohotkey, what is the difference?

What are VK keycodes, what are SC keycodes, and what is the difference between them, in autohotkey?
wildeyes
  • 6,767
  • 5
  • 19
  • 37
3
votes
1 answer

How can I disable the blinking cursor in SciTE?

I just installed the SciTE text editor as it was recommended for AutoHotkey syntax highlighting. However, I can't handle the blinking cursor, and SciTE does not obey the cursor settings on my Windows system, which are set to 'no blink'. Nor does it…
HonestMath
  • 325
  • 1
  • 2
  • 10
3
votes
1 answer

Send only if key was pressed alone

I'd like to remap my windows key to something else, but also I'd like to keep all windows key based shortcut. In pseudo code it would be something like this: when LWin Down until LWin Up if not LWin down abort else …
Nicolas Goy
  • 1,294
  • 9
  • 21
3
votes
2 answers

Can I make this AutoHotKey qwerty-half keyboard script work with caps-lock on?

I found this script at https://autohotkey.com/board/topic/1257-half-qwerty-one-handed-typing/ What this script does is it remaps the spacebar to be a modifier. When space is held, the keyboard is inverted, with the line of symmetry between g and h.…
n8bar
  • 531
  • 1
  • 7
  • 25
3
votes
2 answers

Autohotkey - Different commands when different programs are active

I am trying to write a script that when clicking "SHIFT+ALT+I" it sends a particular command when Microsft Word is active and another command if Microsoft PowerPoint is Active (both programs are running at the same time). The code should be…
esehov11
  • 35
  • 3
3
votes
4 answers

AutoHotkey: Script to Toggle Minimize/Maximize Window

I simply wish to be able to toggle with a hotkey Minimize & Maximize on one certain full screen app that I always use. I want to use this for only one app, and not whichever app has focus. I have read dozens of ways to do this online, none of which…
Kalamalka Kid
  • 240
  • 4
  • 14
3
votes
1 answer

Autohotkey, get value from a c++ or javascript or c# class

I have a Microsoft surface with a surface pen. This pen has 2 side : eraser and tip. I want authotkey to detect when I touch the "eraser" side of the pen when I am inside chrome browser. With the method I have found yet, autohotkey only detect a…
n0tis
  • 750
  • 1
  • 6
  • 27
3
votes
1 answer

How do I detect the next keypress after a hotkey in AutoHotKey

I want to make an AutoHotKey script where the following things happen, in order when Win+Space is pressed. The next keystroke after Win+Space is recorded If it is g then Google is opened If it is Esc then the computer is locked (Many more conditons…
retnikt
  • 586
  • 4
  • 18
3
votes
1 answer

AHK ControlClick and drag?

I created a script for AHK using ControlClick rather than regular mouse events so that I can keep using my mouse to do other tasks while I run the script. However, I need to simulate a mouse click and drag event. Is it possible to do this using the…
Efie
  • 1,430
  • 2
  • 14
  • 34
3
votes
1 answer

How to map Ctrl+Esc to another key in autohotkey

I am trying to map Esc to left Control and Control+ESC to the original ESC. Unfortunately when I press Control+ESC, the Windows start menu is opened. How to solve this issue? Esc::Send {LControl Down} ^Esc::Esc
Name
  • 339
  • 2
  • 18
3
votes
2 answers

Python win32 API to mimic AutoHotKey Tooltip UI

I would like to mimic the tooltip functionality found in AutoHotKey. AutoHotKey code: infoTooltip() { MouseGetPos, xPos, yPos, winId PixelGetColor, color, %xPos%, %yPos%, RGB WinGetTitle, winTitle, ahk_id %winId% ToolTip…
Ben
  • 159
  • 8
3
votes
1 answer

AHK: {space} not working?

I have this code that I'm programming for a game I play. Its nothing special. I want it to run a simple function. Sending. Everything works except {space}. In the game Spacebar is used to make your character jump. I tried it with that, and it didn't…
Broly
  • 45
  • 1
  • 5
3
votes
1 answer

Simple conditional pass through

Wondering if I might be missing something basic in AHK: Is there a way to do a simple conditional pass-through for any mouse or keyboard action, so that if the conditions fail, the action just passes through? Something…
zx81
  • 41,100
  • 9
  • 89
  • 105