Skip to main content

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
0 votes
0 answers
37 views

Windows explorer is in an infinite crash loop after installing a MS Store App

I'm running Windows 11 23H2. I installed this AutoHotKey port from the MS store: https://apps.microsoft.com/detail/9nq8q8j78637?hl=en-gb&gl=US/ Immediately after installing, my windows explorer ...
Utkarsh Agarwal's user avatar
0 votes
0 answers
13 views

Autohotkey 2 using InputLevel for a hotkey in a hotstring not working

Autohotkey seems clear that you can use a hotkey in a hotstring by using#InputLevel, but none of the four hotstrings below work for me. If, instead of using \ in the hotstring, I use some un-mapped ...
Chris F Carroll's user avatar
0 votes
0 answers
24 views

How to create an AutoHotKey v2 hotstring with a backslash in the trigger

This hotstring in my ahk file doesn't work: ::1\2::½ Other hotstrings work, but not this one. I assumed the problem was that backslash is a hotstring EndCharacter so I tried also doing: #Hotstring ...
Chris F Carroll's user avatar
-1 votes
1 answer
53 views

Triple actions shortcuts (Single, Double, Hold) with combination of single key and modifier keys

I have been looking for triple action (Single tap, Double tap, Hold) shortcut mapping method that I can easily tweak and assign with AHK and I have finally found this amazing solution. This single, ...
JinS's user avatar
  • 11
1 vote
0 answers
22 views

AHK script causes lag in Photoshop when using WinTab

The problem only happens when using WinTab. I added the following to PSUserConfig.txt # Use WinTab UseSystemStylus 0 Here is my test script. It will show a white block near the cursor. I've set ...
rint's user avatar
  • 171
0 votes
1 answer
45 views

Key remapping is causing the Ctrl+Alt+Del to be executed in AutoHotKey

In windows when I press Ctrl + Delete in a text editor, a whole word in front of the cursor gets deleted and I want to remap this to the combination: Left Ctrl + Left Alt + P, which means when I press ...
VFX's user avatar
  • 101
0 votes
1 answer
132 views

Disable Ctrl Key in Photoshop using AHK

This is what I have tried. LCtrl is disabled successfully but all the shortcuts using Ctrl such as Ctrl+Z are also disabled. I don't know why {vkE8} isn't working. #IfWinActive ahk_exe Photoshop.exe ...
rint's user avatar
  • 171
0 votes
1 answer
76 views

How can autohotkey minimize this window if there is no minimize button on it?

I installed IDM software on my system, and this pop-up appears in the middle. There is no minimize button, so the only way to close the window is by using the solution. However, Autohotkey with a ...
M. K Ang's user avatar
2 votes
2 answers
789 views

How to hide or disable the cmd console when starting an executable

I wrote an executable that displays a window on the screen and gets some use input. It is bound to ⊞ Win+N: #n:: Run "C:\Perso\dev-perso\dly\dly.exe" My problem: this also opens a cmd (or ...
WoJ's user avatar
  • 3,233
0 votes
0 answers
15 views

Is there a way to automatically switch between two windows of the same app in Windows 10 [duplicate]

I have two windows of the same program that i am constantly switching over manually, (each window needs the whole screen). Is there a way to automate the process of switching between them for let's ...
Elk imad's user avatar
1 vote
1 answer
33 views

I want to reuse GUI code instead of making multiple copies, but GUI is not showing text properly

I want to reuse GUI code instead of making multiple copies (code redundancy), but the problem is that when I press 1 it shows First,  but when I press 2 it still shows First instead of Second. This ...
JethroT's user avatar
  • 17
0 votes
1 answer
67 views

Rebinding Direct Input joystick keys

A game I want to play reads joystick/gamepad input, but doesn't support key rebinding. Whenever Joy6 is pressed, game fastforwards text, and I want this key to increase system volume instead. ...
aiyo4930aiyo's user avatar
1 vote
1 answer
97 views

This single, double and hold AHK script is not working

I found this script from https://autohotkey.com/boards/viewtopic.php?f=5&t=51596 it works perfectly. I like that it is easy to understand and change your desired key easily. The thing is: It ...
ene adelehum's user avatar
0 votes
3 answers
58 views

Where to put caps lock remapping in vim_ahk (AutoHotkey)

Where in the rcmdnk/vim_ahk AutoHotkey package (which file) should I try to remap the caps lock to esc? I know little about AutoHotkey, and for the longest time my entire AHK script consisted of: #...
bongbang's user avatar
  • 133
0 votes
0 answers
31 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 ...
Varity Colgate's user avatar
1 vote
2 answers
129 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 ...
catquas's user avatar
  • 113
1 vote
0 answers
94 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 ...
FarO's user avatar
  • 1,924
3 votes
0 answers
104 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 ...
Dominic Marchese's user avatar
1 vote
0 answers
26 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 ...
Byzod's user avatar
  • 285
2 votes
1 answer
169 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 ...
RoyM's user avatar
  • 21
0 votes
1 answer
91 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 ...
ene adelehum's user avatar
0 votes
2 answers
174 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 ...
Cid-Wings's user avatar
  • 103
1 vote
1 answer
60 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 ...
Lori Yagami's user avatar
0 votes
1 answer
105 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 ...
yfjuu 0's user avatar
  • 23
1 vote
1 answer
173 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 ...
Siha's user avatar
  • 13
1 vote
0 answers
81 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 ...
churchizactiive's user avatar
0 votes
1 answer
43 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-...
moioci's user avatar
  • 444
0 votes
1 answer
161 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 ...
ene adelehum's user avatar
1 vote
1 answer
206 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-"...
Matija Succi's user avatar
2 votes
2 answers
593 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 ...
Shudhesh Velusamy's user avatar
-1 votes
1 answer
234 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 ...
Tharathyn's user avatar
0 votes
1 answer
89 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 ...
Gras Double's user avatar
  • 1,090
1 vote
0 answers
166 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 ...
Shawmik's user avatar
  • 13
0 votes
1 answer
511 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 ...
Shawmik's user avatar
  • 13
1 vote
1 answer
202 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 ...
medukia's user avatar
  • 33
1 vote
1 answer
579 views

Press any key to exit in command prompt?

I have an autohotkey script that runs cmd to check the hash for the selected file. I use certutil command for that task. #h:: hwnd := WinExist("A") for Window in ComObjCreate(&...
medukia's user avatar
  • 33
1 vote
0 answers
102 views

Adjust Aspect Ratio to window size?

I use ImageGlass as the main app to browse and view my photos. I want to create a functionality that when someone try to resize a window displays a photo, it respects a pre-defined Aspect Ratio. here ...
yfjuu 0's user avatar
  • 23
0 votes
1 answer
172 views

How to #include and exclude specific script from the current running script by hotkeys?

I have 2 AHK scripts, the 1st one is named (HotstringsEnglish.ah) and it contains some Hotstrings for English. The 2nd (HotStringsFrench.ahk), it contains some Hotstrings for French. I want when I ...
yfjuu 6's user avatar
  • 43
1 vote
1 answer
190 views

Hotkey to close toast notification

Goal: close Clock app's toast notification with a hotkey combination. Attempt: AHK's Process, Close, ahk_pid, but ahk_pid changes each time. I've also been unable to find the popup window's process in ...
OverLordGoldDragon's user avatar
2 votes
1 answer
777 views

How can I close an application window after it's been idle X minutes?

I use Remote Desktop Manager daily to log into my Macbook Pro from my Windows PC (Windows 10). But once connected via ARD, it stays logged in basically forever. I would like to have the connection ...
JVC's user avatar
  • 414
2 votes
0 answers
324 views

Disable or Re-Map Single-Purpose Keys on Lenovo Yoga 9i

I have a Lenovo Yoga 9i which has single-purpose keys at the right-hand side of the keyboard: These keys do things like change the power usage profile, sound settings, and toggle dark/light mode. I ...
user1476176's user avatar
0 votes
0 answers
65 views

Space combined with input works, but stops by itself

I'm playing a game and I want to press space to jump, however when I hold space and scroll down on my mousewheel I want it spammed for bunny hopping purposes. Space & Wheeldown::Send {Space} is ...
ExoticChaotic's user avatar
0 votes
1 answer
145 views

Focus a window under the mouse and send a hotkey

When pressing "Ctrl + WheelUp/Down" with the pointer under Chrome I would like to focus the Chrome window once and then send the ^+tab hotkey as shown in my code: Ctrl & WheelUp:: ...
Elermino's user avatar
0 votes
5 answers
32k views

Is there any way to keep my mouse moving continuously? (without using mouse jigglers)

There is an app that continously monitors all the other apps that I'm using, but it only registers me to be "working" if my mouse/keyboard is moving. So is there any way to get my mouse to ...
Tanuj's user avatar
  • 113
1 vote
1 answer
631 views

Shortcut to Open Folder in New Window with AHK

The problem: in Windows 10, at least version 1809, there is no shortcut to open a selected folder in a new window. Some say they can do it with ctrl-double click or ctrl-enter. None of this, however, ...
SorryForMyEN's user avatar
2 votes
1 answer
261 views

Another Bracket Script issue

I use AutoHotKey to autocomplete all kind of brackets in the following way: typing ( gives ( -> opening brace bracket only typing (( gives () -> open & close brace with input ...
Michel's user avatar
  • 21
0 votes
2 answers
169 views

Extract compressed file - Autohotkey

I have WinRar installed and I would like to know if the program has command line functions to extract the compressed files using a hotkey with autohotkey. I haven't found this, so I've seen other ...
Elermino's user avatar
1 vote
1 answer
428 views

Why is the order of modifier keys important in AHK?

I'm using Autohotkey to perform a macro when Alt+Control+f is pressed within Electron. I have: #SingleInstance #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. ...
FarO's user avatar
  • 1,924
1 vote
1 answer
325 views

hold CTRL+Double Left Click to open file location on shortcuts

I work with shortcuts of my files and folders very often. Currently we right click on a Shortcut and then look for Open file locationand click on it So... Do you know any method to achieve this easier/...
S.R's user avatar
  • 138
0 votes
1 answer
167 views

How to trigger on alt without triggering on alt+shift and alt+ctrl

In ahk2 LAlt & l:: triggers on lalt+l, lalt+shift+l and lalt+ctrl+shift+l. I want it to trigger on lalt+l only. In other words I want it to NOT trigger on lalt+shift+l and lalt+ctrl+shift+l. Is ...
Matthias Danetzky's user avatar

1
2 3 4 5
28