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
23 views

Why is replaced text erasure inconsistent?

I wrote a simple sequence to output, when typing somewhere the string mdcode, a Markdown code block template such as ```python ``` The code to create the above works most of the time: ::mdcode:: { ...
user avatar
  • 2,480
0 votes
0 answers
16 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 ...
user avatar
  • 23
1 vote
0 answers
24 views

Windows: Remapping 'Shift + AltGr' to a single key? Easier access to '4th level' characters on international keyboards

By holding Shift + AltGr, the 4th level characters can be accessed on international layout on most operating systems: C → c (lowercase — first level) ⇧ Shift+C → C (uppercase — second level) AltGr+C →...
user avatar
  • 111
0 votes
1 answer
21 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 ...
user avatar
  • 1
0 votes
1 answer
59 views

Remapping keyboard

My italian keyboard - Rog Zepyhrus G14 A401IIMy keyboard is missing the numbpad, I'm tryng to change my keys j,k,l to 1,2,3 and so on... does anyone know how to do it ? I create a NumLock with #b:: ...
user avatar
  • 3
0 votes
2 answers
81 views

Windows 10 Batch "Show this window on all desktops"

I have an issue with HWiNFO where the widgets do not show on all desktop even if I right click and select the option to show apps from the window on all desktops: https://www.hwinfo.com/forum/threads/...
user avatar
  • 315
0 votes
1 answer
41 views

Maximize All Windows on Every Virtual Desktop Windows 10

+F10:: WinGet, MyCount, Count GroupAdd, AllWindows Loop, %MyCount% { WinMaximize ahk_group AllWindows } This works to maximize all windows on the active virtual desktop, however it does not ...
user avatar
0 votes
1 answer
34 views

Map 1 key to make it run multiple keys

I have found a few links, and they said to use auto hotkey for this, but its not working for the combination I want, what should the script be, so that when I type X it should run Control+Windows+...
user avatar
2 votes
1 answer
32 views

How to prevent Vivaldi from randomly focusing the URL field instead of the autofocus text input after AutoHotKey-opening it?

I have this AutoHotKey hotkey: F2:: Run, "http://127.0.0.1/test/" KeyWait, F2 return Thus, when I press the F2 button on my keyboard, it opens the URL http://127.0.0.1/test/ in my Web ...
user avatar
  • 21
2 votes
3 answers
23 views

How to make AutoHotKey ignore a hotstring when it is preceded by a period?

I have an AutoHotKey script that expands abbreviations into full words or phrases, but I ran into a problem today. I wanted to add org as a hotstring for "organization", but realized that ...
user avatar
  • 8,776
0 votes
1 answer
62 views

Disable horizontal (left/right) mouse input during specific key press (toggle) or key hold

In Windows 10, I am looking for a way to disable any input from my mouse's movement in the horizontal or left/right direction while still allowing the input in the vertical or up/down direction to be ...
user avatar
  • 393
0 votes
0 answers
14 views

Automate form fill, with email on certain result

I am aware of several methods for auto-filling a multi-page form in a browser, including Autohotkey and Selenium IDE, but I am stuck with regards the final step: I need to send a simple email if the ...
user avatar
1 vote
1 answer
29 views

Add characters on multiple lines

AHK newbie here, My problem is simple, I want to make a script that transforms a text with a hotkey. Default text : AAA : aaa BBB : bbb CCC : ccc Transformed text : <br><br> <u>...
user avatar
  • 57
0 votes
1 answer
30 views

moving a control inside an application [closed]

I wanted to know if there is any tool that can allow me to move UI elements inside an application using script? The details: My father has glaucoma and his field of sight is very limited towards its ...
user avatar
  • 519
0 votes
0 answers
51 views

How to disable CTRL key when it is the only one key being pressed in Photoshop to disable "Switch To Move Tool" function

I want to disable the press Ctrl to switch to move tool function. And keep other hotkeys combine with Ctrl still function properly. eg.Ctrl+Z I have tried the script below but it does not work. #...
user avatar
  • 111
0 votes
0 answers
35 views

Open Chrome with Razer Synapse without cmd showing up

I got a new keyboard and I am trying to switch from AutoHotkey to Razer Synapse, most shortcuts I needed work well but when I am trying to open something in macro a cmd window opens immediately. For ...
user avatar
  • 1
0 votes
1 answer
25 views

How do I assign "Switch to Virtual Desktop 1 (2/3/4)" to F1 (F2/F3/F4) in Windows 11?

My fastest way of working is not to have 4 monitors (swiveling or rotating the head takes at least half a second) but to have fixed Virtual Desktops for specific tasks. So I know "Webbrowser: 3rd ...
user avatar
  • 333
0 votes
0 answers
140 views

AHK: Open folder or active it if opened

I'm using autohotkey and try to do this: Open download folder (Q:\Down in my case) or active it if already opened (subfolders don't count, for example still open Q:\Down if I opened Q:\Down\phvideos ...
user avatar
  • 245
0 votes
1 answer
63 views

AHK and drive safety when constantly writing to disk

First of all am fairly new to all this, so please bear with me. I am in a situation where I need to constantly write the contents of a variable to an INI file located on the C: drive. By constant I ...
user avatar
0 votes
0 answers
36 views

Sending Keystrokes/Macro to a connected device?

Currently I'm trying to automate a bit of work I've been handed. Basically, it's a device where I need to put in the same values over and over again, though with a variable for it (Serial and MAC). ...
user avatar
0 votes
1 answer
35 views

Mapping every key into a modifier when pressed with another

It has become common to e.g. map Caps Lock to Ctrl as a modifier / Esc when pressed alone. I had an idea to do a similar thing with regular keys, e.g. j+w -> Ctrl+w, but j when pressed alone. I ...
user avatar
0 votes
1 answer
76 views

How can I prevent the 0x80004005 error from appearing when I run AutoHotkey code?

#IfWinActive, ahk_exe explorer.exe ; only for explorer ^sc07B:: selected = % Explorer_GetSelection() ; get currently selected item in explorer as source ;*[test] ...
user avatar
0 votes
1 answer
109 views

Autohotkey script doesn't work when VSCode focused

The default behavior for the shortcut <Windows Key + Number> is to open the respective application on your taskbar. I have this behavior overridden by the AHK script posted here, which changes ...
user avatar
0 votes
0 answers
91 views

AutoHotkey: switch Windows desktop in combination with full screen VNC

My problem is that the default shortcuts to change a Windows virtual desktop are not working when running a VNC client full screen. I need to pass all system shortcuts directly to the VNC session, ...
user avatar
3 votes
1 answer
218 views

How to split multi-line clipboard data (e.g. from Excel) in single-line "pastes", one CTRL+V at a time

To illustrate my dilemma as simply as possible: I have a list of values ranging from 1-10 that I want to copy and store. When I press Ctrl+V (or any paste execution), I want 1 to be displayed. When I ...
user avatar
1 vote
2 answers
260 views

Alt + Shift + letter in AutoHotKey

In AutoHotKey, this works just fine RAlt & a::Send {U+00E4} ; RightAlt + a -> ä Now I want to map the capital version of that letter, i.e, RightAlt + RightShift + a -> Ä I tried this but ...
user avatar
0 votes
0 answers
33 views

Why does the script work on a Notepad window, but not on an Explorer window and other program windows?

I found some code that works in the notepad, but can't work in the explorer and some other software, how to change it to universal?Or is there some other way, to scroll the number of lines without ...
user avatar
  • 1
0 votes
1 answer
21 views

Supress #f in Visual Studio from opening "Feedback Hub"

I have the following autohotkey script: SetTitleMatchMode 2 #f:: if WinExist("Mozilla Firefox") WinActivate return #v:: if WinExist("Microsoft Visual Studio") ...
user avatar
  • 101
1 vote
0 answers
32 views

Rewriting the input change logic "Alt" + "Shift" (release) on Windows?

I am trying to implement this algorithm, and rewrite Windows input change logic : I tried this LAlt:: While GetKeyState("LAlt", "P") { Input, key, L1, % "{LControl}{...
user avatar
  • 119
1 vote
1 answer
91 views

Suspend foreground process with AutoHotKey?

I have found how to suspend a specific process, and how to get the process path and name of the foreground window, but I'm not sure how to combine the two. I found this script and have been testing it ...
user avatar
0 votes
0 answers
56 views

Modifier + Left Click to Middle Click

I would like to map a modifier key + left click to function as a middle click. For example, Ctrl + left click to middle click. I use a logitech mouse with the frictionless wheel that tilts left and ...
user avatar
0 votes
0 answers
40 views

I have an issue with dropdownlist and send command

I have a bot that monitors certain areas and captures pixels. I want a DropdownList to press a separate key on the keyboard for each captured pixel. It's a DropdownList where I can set which key to ...
user avatar
1 vote
1 answer
330 views

NirCmd volume control of certain applications from Volume Mixer not working?

So I use this app to mute microphone communication in Valorant. But I also want to mute the game itself. The devs of the game have separated these 2 so in Volume Mixer (SndVol.exe) they are 2 ...
user avatar
  • 11
0 votes
1 answer
112 views

Running a program before Windows login (Task Scheduler fails to execute)

I'd like to run a small *.exe written in AutoHotkey before the Windows user logon. I created a scheduled task for this, but it doesn't seem to work. In the task scheduler it reads "The last run ...
user avatar
  • 296
0 votes
0 answers
66 views

VLC Media Player: edit short jump forward based on total video time, not current position

I am looking to use VLC Media Player in a very specific way. I know I can edit jump sizes for very short jump, short jump, etc. Instead, I would like short jump to reflect the total video time, not ...
user avatar
1 vote
1 answer
118 views

How do I auto highlight specified text in Autohotkey?

For example this replaces all the words test with test. :*?:test::test2 which works but I would like it to highlight that 'test2' given word.
user avatar
  • 1,288
1 vote
1 answer
111 views

Map Alt Space to Win (Start Menu) in Windows 10

I'm trying to map Alt+Space to open the Start Menu on Windows 10 (to the same hotkey as Spotlight on Mac). I'm trying to use AutoHotkey, but it's not working: LAlt & Space::LWin Maybe it has ...
user avatar
  • 431
1 vote
1 answer
418 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 ...
user avatar
  • 125
0 votes
0 answers
67 views

What's wrong with my .bat file syntax?

I'm making a tiny batch file to do three things: Run an autohotkey file to remap certain keys. Immediately after, open a game executable, then wait until I close it in-game and... kill the autohotkey ...
user avatar
0 votes
2 answers
92 views

Autohotkey - Sort ini file in reverse?

Is it possible to read an ini file in reverse? Can it be done with a "sort" or a "filereadline" loop? a.ini [section1] key1=1 [section2] key2=2 [section3] key3=3 [section4] key4=4 ...
user avatar
  • 33
0 votes
2 answers
127 views

Autohotkey - Keyboard Input to Only One Program

I'm trying to make it so that I can read and scroll through my Adobe Reader using the mouse, but when I start typing, I want it to go to my OneNote to take notes while I'm reading. I can set OneNote ...
user avatar
0 votes
0 answers
120 views

Changing integrity of a running process, in Windows from command line?

I trying to change running processes integrity, as can be changed in Process Hacker: So, like this, but in command line that I need. I tried Icacls, and chml, and PsExec, but they not capable to do ...
user avatar
1 vote
2 answers
658 views

How can I execute AutoHotKey in a game

This is not for cheating. I am playing a point and click, single player game. The only goal I have is to move the cursor so it is visible on my TV. My laptop is plugged into my TV screen, and only ...
user avatar
0 votes
1 answer
162 views

Executing Remote Script With Remote Console Output

I can ssh to a RPi 4 from Windows 10 and start a remote Python script, but the output of the script appears on the Windows console. Tried using nohup to be able to close the Windows console without ...
user avatar
  • 13
0 votes
0 answers
68 views

Is it possible to have multiple font colors in gui-edit?

I want to show sections and keys from an ini file in different color in gui-edit (all section color : blue , all key color : red) With this code, the texts are only blue: FileRead, file, a.ini Gui, ...
user avatar
  • 33
1 vote
1 answer
85 views

Autohotkey-Gui-Edit : Can section and key be read in different color in ini file?

How to read sections and keys in different colors in gui edit I'm reading an .ini file, but I can't display the section and keys in different colors. reads in only 1 color a.ini : ↓↓↓↓↓↓↓↓↓↓↓ [title] ...
user avatar
  • 33
1 vote
1 answer
353 views

How do you enable "dark mode" for the AutoHotKey GUI windows?

I use AutoHotKey to pop up little boxes where I can paste various things into and then press Enter to forward this to my more advanced scripts. They look way too bright when I've made such great ...
user avatar
0 votes
0 answers
76 views

AHK's Run is not saving the correct PID

I have a script that is supposed to open a new incognito window, display the pid, then close the incognito window. However the pid saved from Run doesn't match windowSpy's pid. Here's the script: ...
user avatar
0 votes
1 answer
113 views

Autohotkey: Get the shortcut (.lnk) of the currently open file?

When I open a file and press the q key, I want to add the shortcut of that file to a different folder. example: q:: (active file: %A_Desktop%/1.jpg) add active file shortcut(.lnk) to in folder (%...
user avatar
  • 33
0 votes
1 answer
240 views

Autohotkey: I can't get the path of the active file

i want to get path of active file. active file path: C:\Users\e\Desktop\1w.jpg" autohotkey result: C:\Windows\System32\dllhost.exe code: q:: WinGet, Path, ProcessPath, A MsgBox, %Path%
user avatar
  • 33

1
2 3 4 5
26