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

Autohotkey Windows 10 Virtual Desktops

I have an AHK script which saves window positions. At the moment I save Title, X, Y, Width, Height, Class, FullPath etc. I also want to save on which Virtual Desktop they are located on. I dont know how Windows 10 handles Virtual Desktops: Do they…
4
votes
0 answers

Is there a way to use Emmet with Firefox Developer Tools?

I use Firefox's Developer Tools for developing CSS, and it's great, however I have tried many times in the past to get Emmet support in their code editor without any success. I wondered if any of you wizards had any ideas. I came up with 'snippets'…
4
votes
1 answer

AutoHotKey: make Win+Tab act as Alt+Tab, but remap all other Win+ combinations as Ctrl+

I am trying to make my MacBook in Windows behave similar to macOS: so I can switch between apps using Win+Tab (i.e., replicate the Alt+Tab action), but have all the Ctrl+... actions (like, Ctrl+C, Ctrl+V, Ctrl+Z, etc) be accessible using the Win key…
O.W.Grant
  • 163
  • 11
4
votes
2 answers

How to keep original keybind aswell as well as a new one in AHK?

So i have an ahk script to write letters with macrons for Latin words. When you press tilde and a vowel; it types that vowel with a macron. My only problem is removes the function of the tilde key, except typing macrons. adding a ~ to keep the…
HasanQ
  • 75
  • 1
  • 3
  • 9
4
votes
1 answer

Switch keyboard layout Works but NOT Always

I'm a bit new to Autohotkey. I have 3 Language installed, one of them I use very rarely. so I want to Toggle switch only between 2 languages (EN-RU) using WIN+Space. I searched web found code which was short and logically close to my need, I done…
leo007
  • 63
  • 6
4
votes
1 answer

AutoHotkey: Could not close the previous instance of this script. Keep waiting?

I've got an AutoHotkey script that presents the following error when I try to run it again: Could not close the previous instance of this script. Keep waiting? It's a pretty simple script, with the following settings: #NoEnv #SingleInstance…
4
votes
1 answer

How to open a new chrome tab with Autohotkey?

This code opens a new chrome tab and place whole chrome window behind all other running programs: Browser = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" URL = "http://cyberforum.ru" Name = Mid(Browser, InStrRev(Browser, "\") +…
F. Vosnim
  • 476
  • 2
  • 8
  • 23
4
votes
2 answers

Autohotkey: Remap Win key - when pressed alone

Because of an insane laptop keyboard layout and the inability to map Fn-combinations I want to do a few remappings. I would like to use the LWin key as modifier (such as LWin+Right ==> End, etc.). It works just fine. However, I want to stop LWin,…
fastcatch
  • 755
  • 6
  • 18
4
votes
1 answer

How to load binary content to clipboard without anything removed or manipulated? (Autohotkey)

I have binary content stored in a file (containing previous clipboard content) is being modified (without purpose or adding code for this) every time I try to load it to clipboard. The binary content represents organised paragraphs on OneNote copied…
Omar
  • 6,681
  • 5
  • 21
  • 36
4
votes
1 answer

AutoHotkey: Dynamic resize control based on text

Consider the following snippet: FormatTime, time, Gui, Add, Text, vcTime, GuiControl, , cTime, % time Gui, Show, NoActivate Center AutoSize AutoSize is based on the initial value from Gui, Add, Text, vcTime and not on the new value set by…
antonio
  • 10,629
  • 13
  • 68
  • 136
4
votes
1 answer

Disabling ALT menu bar activation with AutoHotKey not working on Windows 8

I've tried using ~LAlt Up:: return in my AutoHotKey script. But to no avail the menu bar still gains focus when I lift the key up. Why does this trick work on other systems but not mine? Or am I doing something wrong?
John DeBord
  • 638
  • 1
  • 5
  • 17
4
votes
2 answers

How to simultaneously scroll two windows?

I want to simultaneously scroll two windows, but the hotkey input method requires me to duplicate it multiple times. My idea is to use Function Hotkeys and A_ThisHotKey variable, but the WheelDown is disable in the program if using this script:…
Ooker
  • 1,969
  • 4
  • 28
  • 58
4
votes
2 answers

Autohotkey extract text using regex

I am just now learning regex using autohotkey but can't figure out how to extract specific string and save to a variable? Line of text I am searching: T NW CO NORWALK HUB NW 201-DS3-WLFRCTAICM5-NRWLCT02K16 [DS3 LEC] -1 -1 PSTN I am…
Perry_M
  • 137
  • 11
4
votes
1 answer

How do I declare a local variable within a hotkey in AutoHotkey?

TL:DR; I can't declare variables inside a hotkey as local, which means temp and index are globally accessible. I recently discovered that local variables cannot be declared as local from within a hotkey or if they are used as parameters within a…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
4
votes
2 answers

How do I prompt for user input in AutoHotkey?

I'm writing an AutoHotkey script which needs to retrieve typed user input as a string. (Username, password, filename, etc.) How do I retrieve user input with AutoHotkey?
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225