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.

Filter by
Sorted by
Tagged with
1 vote
3 answers
2k views

Win 10: How can I make an window be always on top but non-interactive (clicks go through)?

I'm trying to set up a small window in my screen that is always on top but at the same time "ghosted" (not sure about the term), meaning I can't interact or activate it and any mouse click ...
4 votes
2 answers
4k views

How to make AutoHotkey automatically close a pop-up dialog?

Question I'd like AutoHotkey to automatically detect when a certain pop-up dialog appears and take certain actions. How do I do that? Concrete example In my particular case, I'd like AutoHotkey to ...
3 votes
0 answers
67 views

How to bind USB control knobs to adjust the volume on specific applications?

I want to control the volume level of 2 specific Windows Applications using my USB piano's control knobs (Spotify Premium & discord). FIRST TRY - AutoHotkey. The KeyHistory does not detect any ...
0 votes
0 answers
26 views

New to MacOS and trying to replicate a few things that I already do using Autohotkey on windows

Below is my Autohotkey script that automatically copies the text of any questions that I ask on the websites for ChatGPT, Gemini, and Claude (I have them installed as chrome apps) by detecting the ...
1 vote
2 answers
71 views

Switch windows using windows key + # shortcuts by window not app? Also show numbers on taskbar?

You can use the keyboard to switch programs in Windows 11, for example Windows + 2 goes to the second app on the taskbar, and Windows + 3, 3 goes to the second window of the third app. But it is a big ...
1 vote
0 answers
45 views

How to convert a script using VarSetCapacity to AHK v2?

I have been using the script Advanced Window Snap, which snaps windows to various places of the monitor, which uses the function GetMonitorIndexFromWindow to determine in which monitor a window is ...
4 votes
1 answer
3k views

Windows 10 Volume Mixer fails to keep System Sounds muted over Remote Desktop Connection

After having muted the System Sounds on the remote desktop machine, it shall unmute itself after several seconds. This pattern is persistent. I use my laptop at work, and use Remote Desktop Connection ...
0 votes
2 answers
140 views

Execute something from the start menu using autohotkey

How do I start something from the windows start menu using autohotkey? I can do Send ^{Esc}MyAppName{Enter} And everything works except the last {Enter}. The screen stops on the open start menu ...
13 votes
1 answer
7k views

AutoHotkeyA32 vs. AutoHotkeyU32 vs. AutoHotkeyU64

The portable .zip archive for AutoHotkey contains 3 executables: AutoHotkeyA32.exe, AutoHotkeyU32.exe, and AutoHotkeyU64.exe. Based on the filenames, I assumed 32 and 64 refer to 32-bit and 64-bit ...
2 votes
1 answer
85 views

AutoHotKey WinGetText not retrieving text

I am learning AutoHotKey and trying to see whether I can use it to automate certain processes that we need to do. It will open a browser window using MS Edge (once I get it working I can code it to ...
1 vote
0 answers
16 views

Drag to open link in container tab, in Firefox

What I want: Drag a link to a direction (left for example) then it was opened in a container tab (I have only one container currently) What I have: Firefox beta 124 Violentmonkey Glitterdrag that can ...
1 vote
2 answers
2k views

Fine tune this red border around active window AHK script

I am a autohotkey novice, but i've found this kind of useful script for putting a red border around my active window making it more noticeable. I've installed autohotkey and run the script, however I ...
0 votes
1 answer
61 views

Prevent sending a specific key if I'm pressing other 2 or more keys

I have this mouse with additional forward and back buttons at the side and here's an AHK script that I use with it, It's main purpose is: If middle mouse button is scrolled up while holding down ...
0 votes
2 answers
93 views

AutoHotKey CapsLock conditon the activation of the script

In AutoHotKey (AHK) I wanted to just condition my script. If caps lock his OFF nothing happen if it's ON the script his executed and of course detect any change here is my try but won't work it allow ...
0 votes
1 answer
4k views

How to pause an AHK or Autohotkey script with one key, but use a different key to unpause it

I need to pause my AHK or Autohotkey script with the space key, but unpause it with the y key. I've been searching for a while without any success. I've tried different combinations, but I never get ...
18 votes
5 answers
10k views

How to disable only some Windows 10 global shortuts to use them in third-party applications?

1. Briefly I want to disable only some Windows 10 default global hotkeys, to use this hotkeys for run Sublime Text commands. 2. Detail I have Windows 32-bit 10.0.14393. In Windows 10 we have many ...
22 votes
5 answers
11k views

How do I disable specific windows 10/Office Keyboard Shortcut (CTRL+SHIFT+WIN+ALT+D)

it seems that Office has decided to hi-jack the keyboard shortcut CTRL+ALT+SHIFT+WIN+D. That might not seem like a problem, but I have assigned that keyboard shortcut in AutoHotKey and have been ...
1 vote
0 answers
41 views

How do I prevent the GUI overlay from disappearing when I play videos in fullscreen?

I made a screen dimmer in AHK. The code below is a stripped-down version: opacity := 100 Gui 1:New,+AlwaysOnTop -Caption +ToolWindow +E0x20, GuiName Gui 1:Color,Black Gui 1:Show, x800 y300 h300 w300 ...
0 votes
1 answer
80 views

AHK keywait for multiple keys (missing (SC) (VK))?

I got this function from here : https://www.reddit.com/r/AutoHotkey/comments/1arcp8q/comment/kr1km61/?context=3 It waits for one or multiple keys to be pressed, But It doesn't accept scan code (SC) or ...
1 vote
1 answer
151 views

Autohotkey: Can't get the name and path of a pdf file

The following code gets the selected text from a file after pressing ctrl+shift+c and appends its name and path to it, then copies it to the clipboard. It works with a .txt file, but not with a pdf ...
1 vote
0 answers
54 views

TextExpander Performance Issues - Windows

I have been looking all over online to see if anyone has been experiencing performance issues with their TextExpander snippet expansion. For example, on my Mac my snippets expand just fine, it's fast ...
3 votes
3 answers
1k views

Autohotkey go to EOL

In my autohotkey script I've created the following hot keys that I thought would allow me to move my cursor to the end of a line or beginning of a line instead of using Home and End. #NoEnv ; ...
0 votes
1 answer
38 views

Any fix for AHK (v1.1) latency across rdp connection?

Much of my work happens on a remote app connected via rdp. I don't have access to install AHK on the remote server. I have several dozen text macros in AHK that simplify this greatly. One- or two-...
2 votes
1 answer
2k views

How can I scroll efficiently horizontally Microsoft Paint? (Autohotkey maybe)

I just want to use Paint for a whiteboard style sketching on math problems etc. And I really need a way to navigate efficiently on the page. Maybe even like: hold space + move mouse, to grab the page ...
47 votes
14 answers
22k views

What to do when I need more keys than my keyboard has?

I have a standard keyboard. With AutoHotKey, I have mapped F1 to F12 to perform extremely specific tasks which I have muscle-memorized, and in addition to these, I have numerous WinKey+Letter ...
0 votes
1 answer
312 views

How to change ALT+TAB to CONTROL

I do a lot of switching between apps and I'd like to know if there is a way to do that using Autohotkey. is there a script for that ?
0 votes
2 answers
333 views

Running a keyboard shortcut at startup (FN + WIN) automatically

I have a Redragon K580 keyboard with an option to lock the Windows key with a shortcut (FN + Win). The problem is that it doesn't stay locked permanently and I have to do it after each reboot and most ...
0 votes
3 answers
543 views

Windows - Alt Click on a window to close window under the mouse cursor

Is it possible to close a window, simply by clicking anywhere inside it? Hold down alt key, and click the windows you want closed. Much like shooting targets in a game. Why not Alt+F4? This would be ...
2 votes
3 answers
13k views

How do write a toggleable hold down key in AHK?

I'm trying to write an AHK script that allows me to do the following: Press the t key to toggle the 1 key being held down so that it types a bunch of 1's indefinitely until I press the t key again. ...
-1 votes
1 answer
155 views

How do I change my Tilde key to produce the n-dash when pressed? [duplicate]

How can I change a key on my keyboard so that it produces a different character than what it was designed to produce? I find the Tilde key (the little key with ∼ above the Tab key) useless and I would ...
12 votes
2 answers
7k views

Windows virtual desktops: Cycle back to first desktop at end

Let's say I have three virtual desktops. I know I can navigate through them using: ctrl + windows + left | right However, is there a way to make it cycle back through to the beginning if I reach the ...
0 votes
1 answer
131 views

Trying to make my middle mouse button to function as 3 different keys based on the elapsed time it has been pressed

I'm using AHK and my main goal is to make my middle mouse button to function as it normally would if I pressed it once, but would trigger Ctrl+C or copy if I pressed and held it for 500ms and paste ...
1 vote
1 answer
135 views

Running batch commands in AutoHotKey

I am on AutoHotKey and I'd have to run an application via batch command. The command is quite articulated, it has the form of: " -path of the application- " " -path of a text file-"...
2 votes
2 answers
490 views

Shortcut to switch between visible windows?

Often, I'll have two or three different applications/windows open side-by-side in split screen mode. I'd like to know if there's a specific shortcut to switch/cycle between windows that are visible to ...
0 votes
1 answer
5k views

What's the utility of the return command in autohotkey?

In the instances where the return command returns a value, the utility is obvious. I have seen the return command being used even when it is seemingly unnecessary. Let me show the following examples: ...
11 votes
4 answers
10k views

Switch Ctrl and Alt with AutoHotKey without messing up the Alt-Tab switcher?

I want to switch the Ctrl and Alt keys in Windows XP. I created an AutoHotKey script that contains the following: LAlt::LCtrl RAlt::RCtrl LCtrl::LAlt RCtrl::RAlt This works, but the only problem ...
3 votes
3 answers
10k views

How to debug AHK, like printing out debug string to console?

I wanted to debug AHK code that calls python script and batch file. I inserted "print SOMETHING" in the python script, but it doesn't seem that the result is shown to the console. Is there a ...
13 votes
4 answers
7k views

Cannot get Windows snipping tool to auto run with AutoHotKey

I am trying to get Windows 7 sniping tool to run when I hit my PRINTSCREEN keyboard button with AUTOHOTKEY. I have been unsuccessful so far though. Here is what I have for the AutoHotKey script. ...
0 votes
1 answer
72 views

Completely disable keyboard input when RWin is held down

Use case: I have a keyboard on which I often accidentaly press the right Win key, instead of Alt Gr. (FTR, it's an azerty keyboard) As a result, instead of doing e.g. Alt Gr+', which results in typing ...
1 vote
0 answers
155 views

How to pause the AutoHotKey script when a dropdown list is opened, and resume it after I select the entry of the dropdown list?

I am working on a data entry project. The software of the company is really peculiar and old-fashioned. I have an AutoHotKey script to copy-paste the entries automatically, but there is a dropdown ...
0 votes
1 answer
334 views

Script to automatically copy the next line of text from a text file each time I paste it somewhere

I have a text file that contains some information on each line. I want to copy automatically the first line of the file, and then paste it somewhere else. As soon as I paste that line, I again want to ...
1 vote
2 answers
4k views

AutoHotKey: Pressing two keys simultaneously without repeats

Is there a way to press two keys simultaneously and bind it to a macro key (for example, pressing "s" and "d" simultaneously and then bind it to "a" key) without it ...
2 votes
1 answer
4k views

How to edit/change/modify the Syntax Highlighting Color in VS Code

How to edit/change/modify the Syntax Highlighting Color in VS Code, ie for Autohotkey and/or Markdown languages? For example: Im using the High Contrast theme (black background), and in that theme, ...
1 vote
1 answer
153 views

Is it possible to resize window to be larger than the desktop?

I have a program whose window size should be greater than the desktop because when maximized, it is still short of a few pixels at the right, making it hard to control scrollbar when the mouse cursor ...
4 votes
2 answers
3k views

AutohotKey script for select copy and middle click paste in win 10

Similar to the question here, I found an AutohotKey script (solution) below in order to copy highlighted text and paste it by clicking on the middle button of the mouse. However there is still a lack ...
2 votes
2 answers
4k views

Connecting/Disconnecting to Bluetooth Device via CMD, PS, or AHK?

I'm at my wits' end right now. I'm on the latest version of Windows 10 and I just want to run a script to connect/disconnect to my Bluetooth headphones when executed. I've looked at a couple other ...
2 votes
2 answers
3k views

Can use special characters without pressing shift key in windows10?

how can I use number keys in top of keyboard just for special characters like (@#$) without pressing shift key to use that. -for example when pressing num2 key just show @ I search about that just ...
0 votes
1 answer
110 views

Convert multiple files with AutoHotkey

I'm trying to setup AutoHotkey to automatically convert a selected file to PNGs when pressing a CTRL+ENTER. To do the conversion, I'm using the CLI version of Filestar. I have figured it out how to ...
2 votes
1 answer
4k views

AHK is possibe to make this script works in inactive window

Is it possible to make this script work in a specific inactive/minimized window. ? loop { dllcall("keybd_event", int, VK, int, SC, int, 0, int, 0) dllcall("keybd_event", int, VK, int, SC, int,...
0 votes
2 answers
273 views

AHK running url as standalone program - workaround needed

I created this program ^+l:: IfWinExist Toggl WinActivate, Toggl else run "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -app=https://www.toggl.com/app/#timer return But the ...

1
2 3 4 5
27