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

How to write async fetch() without async?

I have a line of code that uses await fetch(). I'm using some script injecting that invokes eval( "await fetch ...etc..." ), but the problem is that await doesn't go when it's called from eval(). So, the aim is to rewrite just this one line without…
Redbraid
  • 63
  • 1
  • 2
  • 8
5
votes
1 answer

AutoHotkey: list all open windows

WinGet, OutputVar, List can get a list of all unhidden windows. It shows way more than what user can see on the Windows taskbar. How to limit the window numbers to those shown on the taskbar. Like the simple list in the Task Manager. (Fewer details…
minion
  • 561
  • 4
  • 17
5
votes
5 answers

AHK Alternative key on long press

I have a keyboard with these arrow (less/greater than) characters as alternate keys on Y and X. Let's focus on the key X for this example. By default the alternate character > is triggered with AltGr + X of course. But I would like to trigger it by…
DanielM
  • 317
  • 2
  • 11
5
votes
1 answer

Why is my call to WinGetTitle returning an empty string?

I'm building a script that will pause my music if it's playing when I lock my workstation. I use spotify, which should be simple to get it's play state by inspecting the window title. When not playing anything, it's title is simply "Spotify", but…
Rich
  • 53
  • 4
5
votes
1 answer

What to do for Autohotkey functions that not available on Autokey

I want to migrate my AHK code to Autokey code for Ubuntu (AHK code monitors clipboard and mouse movements, performs advanced string processing and paste it to the specific window). There are many functions like OnClipboardChange, StringReplace,…
suyogricha
  • 51
  • 3
5
votes
1 answer

How to activate a function everytime the target window becomes active in AutoHotkey

I would like to activate a sound profile every time I switch to a specific program and change back to the default profile every time I leave it. This action is turned on in a GUI via a radio button. The workaround I have created is: Auto_Ftsps: …
5
votes
2 answers

AutoHotKey: move to next program when press a key

For example, I have Notepad, Word, and Chrome open. How do I write the script in AutoHotKey such that when I press the F9 key on the keyboard, it will move to the next application?
user1187968
  • 7,154
  • 16
  • 81
  • 152
5
votes
4 answers

What is AU3_Spy.exe? Where can I find it?

Whenever I try to launch the Windows Spy utility in AutoHotkey, it fails with an error "Could not launch file: U:\Software\AutoHotkey_1.1.26.00\AU3_Spy.exe" Initially I thought that I may have had a corrupted download. However, after redownloading…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
5
votes
3 answers

Automatically reload AutoHotkey script when modified

When testing AutoHotkey scripts, I sometimes forget to reload my scripts after making changes. This leads to me accidentally testing old, outdated versions of my scripts. Instead of manually reloading the script, I would like to have scripts…
Stevoisiak
  • 23,794
  • 27
  • 122
  • 225
5
votes
3 answers

AutoHotKey: #IfWinActive .* Explorer *. ? in windows 7

I'm trying to make an AutoHotKey macro that's active only in Windows Explorer but I don't know the name of Explorer in Windows 7. I tried the following: ;Make explorer understand that Ctrl+L means goto location bar (like Firefox /…
Ola
  • 629
  • 1
  • 8
  • 18
5
votes
2 answers

How to get an AHK console?

I'm constantly trying to run quick tests in AHK. It's a pain to have to think of a new hot key, write all the environmental variables, save, build, etc. I'd like to be able to type out a short test, press enter, and get some feedback from AHK. Where…
Travis Heeter
  • 13,002
  • 13
  • 87
  • 129
5
votes
1 answer

media player classic - jump to point in video/audio programmatically

In Media Player Classic I found a way to jump to a point in a video/audio programmatically, avoiding the Go To... box. The jump distances are available at Options → Tweaks, and…
vafylec
  • 965
  • 1
  • 6
  • 23
5
votes
3 answers

Launch Onenote UWP using Autohotkey

I'm trying to launch onenote UWP from autohotkey but cannot pin down the specific exe file to launch. I ran the onenote uwp and found the name as Microsoft.Office.OneNote_17.7466.57691.0_x64__8wekyb3d8bbwe and the location is C:\Program…
Jason
  • 1,200
  • 1
  • 10
  • 25
5
votes
2 answers

How to click a specific button on a window with autohotkey?

The button I want to click is on a not maximized on top window. It's like a tiny window on top of everything else. I want to address a hotkey to its button, for example pressing D and the button is pressed.
john234
  • 51
  • 1
  • 1
  • 4
5
votes
2 answers

Autohotkey - How to adjust volume only of a specific program?

I want to control volume of a specific program and not the whole master volume. I found THIS thread that has code for controlling only the volume of Windows Media Player from Volume Mixer . This is the whole script: SetTitleMatchMode,…
chico
  • 51
  • 1
  • 3