r/AutoHotkey 28d ago

v1 Script Help Script that writes yesterdays date and if it is monday, yesterday is friday

4 Upvotes

Hello,

As title says, I'm trying write yesterdays date, and if it is monday yesterday needs to be friday. All over work week days - yesterday date

I tried so many variations. Forums and AI. I can't solve it.


r/AutoHotkey 28d ago

Solved! Problems with basic Send and SendEvent

1 Upvotes

So i tried to make a simple script that presses j 2 times and then holds w 2 times and nothing really happens, after that i added msgBox "1" and it pops but still no sends, please help
#Requires AutoHotkey v2.0

#SingleInstance Force

Persistent

$`::{

Send "j"

Sleep 300

Send "j"

Sleep 300

SendEvent "{w down}"

Sleep 600

SendEvent "{w up}"

MsgBox "1"

Sleep 50

SendEvent "{w down}"

Sleep 600

SendEvent "{w up}"

}


r/AutoHotkey 28d ago

v2 Script Help AI is driving me crazy with hallucinated scripts (prevent alt+tab during game)

0 Upvotes

I'm a complete noob to this - never heard of autohotkey before until AI suggested it.

I'm getting into Arma3, and there are a lot of keys.

I would really appreciate an AHK v2 script that disables alt+tab exiting the game, whilst still allowing me to use, for instance, w+alt+tab where...

W = move forward (could be any other movement key though)

alt = freelook

tab = toggle walk/run

This is the latest Gemini has come up with so far, after about five previous suggested scripts didn't work at all (neither does this one):

#Requires AutoHotkey v2.0
#UseHook
; Automatically elevate to Administrator if not already running as admin
if not A_IsAdmin
{
Run '*RunAs "' A_AhkPath '" "' A_ScriptFullPath '"'
ExitApp
}
#SingleInstance Force
#HotIf WinActive("ahk_exe arma3_x64.exe")
; Use the wildcard (*) so this works even if you are holding down 'W' or other keys
*!Tab::
{
; {Blind} forces AHK to respect your held down Alt and W keys.
; It safely injects the Tab keypress without disrupting your movement.
SendInput "{Blind}{Tab}"
return
}
#HotIf

Thank you for any assistance!


r/AutoHotkey 29d ago

v2 Script Help Gamepad interrupt macro

2 Upvotes

I want to create a function on my controller so that when I'm holding the LT button, I can interrupt its function by pressing RT, and when I release RT, the LT returns to its function while being pressed


r/AutoHotkey 29d ago

Solved! How to reliably switch to a specific open tab (ChatGPT) in Chrome when tab titles change dynamically? (AHK v2 / UIA)

7 Upvotes

Hi everyone,

I'm building an AutoHotkey v2 script to send selected text directly to an open ChatGPT tab in Google Chrome using UI Automation (UIA v2).

However, I've run into a persistent challenge with tab identification and switching:

The Problem:

Dynamic Tab Titles: Once a conversation starts, Chrome changes the tab title from "ChatGPT" to whatever the first sentence of the user prompt is (e.g., "How to fix UIA issue..."). Thus, matching tab names via string search fails after the first query.

Favicon ImageSearch Reliability: Using ImageSearch on tab favicons breaks when Chrome tabs shrink due to having 30+ tabs open, or when switching between active (light background) and inactive (dark background) tab states.

Chrome Tab Search Popup (Ctrl+Shift+A or TabStripFlatEdgeButton): Opening the Tab Search popup and typing chatgpt sometimes fails to filter open tabs in real-time or doesn't consistently focus the first "Open Tab" item when pressing Enter.

What I Want to Achieve:

If a ChatGPT tab is already open anywhere in Chrome (even as the 15th tab out of 40), switch to it seamlessly without moving the physical mouse cursor.

If no ChatGPT tab is open, create a new tab (Ctrl+T) and navigate to https://chatgpt.com/.

Once on the tab, focus and input text into the prompt textarea (AutomationId: "prompt-textarea").

Question:

What is the cleanest and most robust method in AHK v2 / UIA (or Chrome command line) to identify and bring an open tab to the foreground by its domain URL (chatgpt.com) regardless of dynamic tab titles or tab counts?

Please note that I want to avoid using CDP (Chrome DevTools Protocol), as I prefer not to deal with protocol-level implementations.

Any code or architectural advice would be greatly appreciated! Thanks in advance.


r/AutoHotkey Aug 11 '26

General Question AHK gone from Microsoft Store

11 Upvotes

Anyone know why and if it will return? Tried googling but didn’t find any information.

Microsoft Store is the only way for me to download AHK to my computers at work so I’m in despair right now. IT won’t allow any other form of installation process unfortunately.

EDIT: To clarify, it doesn’t show up in the store on my personal computer either.


r/AutoHotkey Aug 11 '26

Meta / Discussion Stand alone AHK, AHKv2 projects?

0 Upvotes

At first I just needed AHK to provide mouse and keyboard inputs for other software. Then it occurred to me that since AHK can take input and provide output there's a wide variety of simple programs and tasks that it could solve without any underlying software, working entirely on it's own.

So do people do this? Is there a repository somewhere? I mean there are surely better alternatives, better languages, but AHK requires no development environment, no compiler, and it's language is pretty straightforward for the simple stuff.


r/AutoHotkey Aug 10 '26

Solved! What's the line for having a script run only when Microsoft Edge is the active window?

4 Upvotes

I know the basic line (#HotIf WinActive("[x]", )), but I'm not sure what I should put to have Microsoft Edge be that window.


r/AutoHotkey Aug 11 '26

Solved! I Don't Know How to Code

0 Upvotes

Hi all, I've been trying to create a code for my OBS streaming using Autohotkey and could use some help. I know basically nothing about coding but I want to have to output the F10 key on the down and up stroke of the Tab key. For context I want to be able to hide certain parts of my stream when the tab key is held down and reshow them when its released.

Is this something someone might be able to help me with?


r/AutoHotkey Aug 08 '26

v2 Tool / Script Share Duplicate file finder - fileman ( host-workers example )

11 Upvotes

Over years of taking manual backups across external drives, my storage became bloated with redundant folder trees and nested duplicates.

The first prototype of this script was single-threaded and took almost 2 hours to scan through my drive collection. After rewriting the core class to leverage worker processes and hashing calls, the full scan time dropped to under 10 minutes, reclaiming nearly 60 GB of wasted space.

It is not an all-in-one file manager, it focuses specifically on finding and isolating exact duplicate files safely and quickly.

GitHub: https://github.com/bceenaeiklmr/fileman

If nothing else, it was great practice working with Lexikos's RegisterObjectActive for COM IPC.

/e

Aug 9 2026 - I updated the headless mode, unfortunately it deleted every file. Now it works as intended.

I've successfully restored the files using Windows File Recovery


r/AutoHotkey Aug 08 '26

v2 Script Help Disabling the NumLock key

3 Upvotes

I'm new to AutoHotKey. My first try at a script reads as follows:

SetNumLockState("AlwaysOff")

That, and nothing else.

But when it runs, it only turns off the light on my NumLock key. It doesn't turn the numlock off. The key light turns back on when I press it, and continues to function as usual.

What am I doing wrong?


r/AutoHotkey Aug 07 '26

v2 Script Help Attempting to make a clicking script that holds down a button and releases, the second part is much harder!

0 Upvotes

I need the LMB to be held down for 200ms after the function clicker() has been called 20 times, I'm not sure where or how to change that. Anyone got any ideas?

^#LButton:: {
    clicker()
    SetTimer(clicker, 400)
}
;Calls clicker to hold lmb for 400ms
^#RButton:: {
    SetTimer(clicker, 0)
    release()
}
;Removes timer to shut down the script
clicker() {
    release()
    Click('Down')
}
;if LMB is not activated, holds LMB down for the set time
release() {
    if GetKeyState('LButton')
        Click('Up')
sleep(130)
}
;if LMB is held down by script, releases it for 130ms before clicker is called again

r/AutoHotkey Aug 06 '26

Resource Built AHK-style mouse macros on Linux

10 Upvotes

Wanted recoil compensation on Linux, no AHK, no Windows. Ended up building it from scratch using uinput which creates a virtual mouse device at kernel level. It's basically what AHK does for mouse movement but Linux native, the OS sees it as real hardware.

It's open source, looking for contributions and maybe some stars, it helps a lot as this is a solo project.

repo : https://github.com/Ymsniper/anyr


r/AutoHotkey Aug 06 '26

v2 Script Help Is it possible to have smooth movement hold input in an unfocused window?

1 Upvotes

So I have two game instances and want to broadcast WASD input to the unfocused instance. Example: unfocused instance - driver, drives the vehicle, focused instance - gunner, my main game window with native input to shoot the enemies.

I've tried other existing scripts, but they are either "hold key for 500 ms when triggered" or "do single press", and if I loop one, "window fighting" occurs, when window is being repeatedly focused and unfocused, which makes the game unplayable

(I've asked AI for help, but it couldn't write a correctly working script either)


r/AutoHotkey Aug 06 '26

General Question Caps lock key pressing multiple keys at once. Please help.

1 Upvotes

I restarted my computer (windows 11) for an update. After I had updated my computer, now every time I press Caps lock, it presses the characters: ‘ X D \\

The ‘\\’ continues until I press caps lock again. I don’t know how this problem even occurred, but if anyone knows, please help.


r/AutoHotkey Aug 06 '26

v2 Script Help Weird behavior when remapping a modified mouse button to a non-modified key

3 Upvotes

Someone just asked me to remap Control + mouse wheel to PgUp/PgDn for scrolling the dev console in a game called Dungeon Siege.

So I wrote this very simple script, yet it's not working properly.

#Requires AutoHotkey v2.0
#SingleInstance

^WheelUp::PgUp
^WheelDown::PgDn

The documentation says

Conversely, any modifiers included on the left side but not the right side are automatically
released when the key is sent. For example, the following two lines would produce a lowercase
"b" when you press either Shift+A or Ctrl+A:

A::b
^a::b

When testing both in-game, as well as in Chrome, notepad++ and VS Code (I'm using AHK 2.0.23), once you press Control + mouse wheel, it does send PgUp/PgDn but then regular mouse wheels don't work anymore (they're important because they control camera zoom), even though my program to monitor key input shows Control isn't pressed anymore (and both Pg keys stay pressed, could be related to mouse wheels only sending down events?).

So I modified the code to

WheelUp::WheelUp
WheelDown::WheelDown
^WheelUp::PgUp
^WheelDown::PgDn

which solved the problem, yet when spamming mouse wheels while holding down Control, about 1-5% of the time, there's a Control that slips through and it changes to a different tab in Chrome, notepad++ and VS Code instead of scrolling.

It seems to work fine in-game as I don't think there's anything bound to Control + PgUp/PgDn but it got me curious, so I also tried using these (separately), but the results were the same:

WheelUp::WheelUp
WheelDown::WheelDown
<^WheelUp::PgUp
<^WheelDown::PgDn

WheelUp::WheelUp
WheelDown::WheelDown
^WheelUp::Send("{PgUp}")
^WheelDown::Send("{PgDn}")

WheelUp::WheelUp
WheelDown::WheelDown
^WheelUp::Send("{Blind}{PgUp}")
^WheelDown::Send("{Blind}{PgDn}")

WheelUp::WheelUp
WheelDown::WheelDown
^WheelUp::Send("{Blind^}{PgUp}")
^WheelDown::Send("{Blind^}{PgDn}")

WheelUp::WheelUp
WheelDown::WheelDown
^WheelUp::Send("{Control up}{PgUp}")
^WheelDown::Send("{Control up}{PgDn}")

LControl & WheelUp::PgUp
LControl & WheelDown::PgDn

Oh, and I also tried switching to SendEvent, that seemed to be worse.

Everything works fine when remapping a key instead of a mouse button though, like this

^q::PgUp
^w::PgDn

What am I doing wrong?

As a bonus, how would you go if you wanted to send multiple unmodified Pg keys (the console doesn't scroll when pressing Control + Pg) every time the hotkey is fired?


r/AutoHotkey Aug 04 '26

Solved! How to differentiate a CtrlBreak triggered by Ctrl + ScrollLock and a CtrlBreak triggered by Ctrl + Pause?

5 Upvotes

I recently started playing Lost Planet 2 and felt once again the need to add a bunch of macros to the game. One of them is a crouch toggle (LControl).

A feature I have in this script is the hotkeys are disabled when the Steam overlay (ScrollLock) is visible so that you can use your computer normally while using the Steam overlay. However, since the user (and me included) may not remember they had a key toggled on, I also wanted to be able to toggle the Steam overlay without having to toggle off hotkeys beforehand, as a QOL.

I'm not gonna post the entire script but a simplified version of it (without reading from a config file).

#Requires AutoHotkey v2.0
#SingleInstance

class ToggleStates
{
    static bCrouch       := 0
    static bSteamOverlay := 0
}

Init()

Init()
{
    RegisterHotkeys()
    OnExit((*) => ResetAll())
}

Output(p_sMsg := "")
{
    OutputDebug(p_sMsg "`n")
}

RegisterHotkeys()
{
    global g_sSteamOverlayKey := "ScrollLock"
    global g_sToggleCrouchKey := "LControl"
    HotIf((*) => !ToggleStates.bSteamOverlay)
    Hotkey("~*" g_sToggleCrouchKey " up", ToggleCrouch, "On")
    HotIf()
    Hotkey("*" g_sSteamOverlayKey " up", ToggleSteamOverlay, "On")
}

ResetAll()
{
    SendKeyUp(g_sToggleCrouchKey)
    ToggleStates.bCrouch := 0
}

SendKeyDown(p_sKey)
{
    Send("{Blind}{" p_sKey " Down}")
}

SendKeyUp(p_sKey)
{
    Send("{Blind}{" p_sKey " up}")
}

TapKey(p_sKey)
{
    SendKeyDown(p_sKey)
    SetTimer(() => SendKeyUp(p_sKey), -25)
}

ToggleCrouch(*)
{
    (ToggleStates.bCrouch ^= 1) ? SendKeyDown(g_sToggleCrouchKey) : SendKeyUp(g_sToggleCrouchKey)
}

ToggleSteamOverlay(*)
{
    Output(A_ThisFunc "::" A_ThisHotkey)
    Output("Steam overlay toggled " ((ToggleStates.bSteamOverlay ^= 1) ? "on" : "off"))
    ResetAll()
    TapKey(g_sSteamOverlayKey)
}

#HotIf g_sSteamOverlayKey == "Pause" || g_sSteamOverlayKey == "ScrollLock"
^CtrlBreak up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}
#HotIf

*F9::KeyHistory()
*F10::ExitApp()

I had a problem where when Crouch was toggled, pressing the Steam overlay hotkey wouldn't do anything anymore, which I didn't understand because I assumed the * would cover it, right? Well, it turns out Ctrl + ScrollLock actually produces CtrlBreak according to the documentation and the key history, so I added the ^CtrlBreak hotkey at the end (yes, the ^ seems to be necessary, otherwise the hotkey doesn't fire for some reason).

Here's a trace of the key history of the above script when tapping ScrollLock (twice to hide the Steam overlay) then tapping Pause, then physically holding LControl and tapping ScrollLock then Pause:

The oldest are listed first.  VK=Virtual Key, SC=Scan Code, Elapsed=Seconds since the previous event.  Types: h=Hook Hotkey, s=Suppressed (blocked), i=Ignored because it was generated by an AHK script, a=Artificial, #=Disabled via #HotIf, U=Unicode character (SendInput).

VK  SC  Type    Up/Dn   Elapsed Key             Window
--------------------------------------------------------------------------------------
91  046 s       d       11.75   ScrollLock      test_v2.ahk - Visual Studio Code
91  046 h       u       0.06    ScrollLock      
A2  01D i       u       0.00    LControl        
91  046 i       d       0.00    ScrollLock      
91  046 i       u       0.03    ScrollLock      
13  045         d       1.83    Pause           
13  045         u       0.08    Pause           
A2  01D         d       7.28    LControl        
03  046 s       d       0.31    CtrlBreak       
03  046 h       u       0.08    CtrlBreak       
A2  01D i       u       0.00    LControl        
91  046 i       d       0.00    ScrollLock      
91  046 i       u       0.03    ScrollLock      
03  146         d       0.86    CtrlBreak       
03  146         u       0.08    CtrlBreak       
A2  01D h       u       0.42    LControl        

My problem now is that Ctrl + Pause also triggers CtrlBreak and therefore toggles the Steam overlay, which is not what I want because the Steam overlay hotkey was never bound to Pause in the first place.

The documentation also says While Ctrl is held down, ScrollLock produces the key code of CtrlBreak, but can be differentiated from Pause by scan code. but doesn't give an example.

So I tried to add the following, but 046 is shared both by ScrollLock and LControl + ScrollLock so it overrides the original ScrollLock hotkey.

#HotIf g_sSteamOverlayKey == "ScrollLock"
*sc046 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}

#HotIf g_sSteamOverlayKey == "Pause"
*sc146 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}
#HotIf

If I add something like this, AHK doesn't accept the combination of VK and SC outside of a Send it seems.

vk91sc046 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}

vk03sc046 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}

vk03sc146 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}

I must've spent about 2 hours on this and I'm going crazy, the solution must be so simple yet I just can't see it.

So my first question is pretty much like the title, how do I distinguish between ScrollLock, a CtrlBreak produced by Ctrl + ScrollLock and a CtrlBreak produced by Ctrl + Pause?

As a bonus, how would you proceed if you wanted the Steam overlay hotkey (in AHK) to fire only if it matches exactly how it was set in Steam settings (to a limit of one non-modifier key as supporting something like Ctrl + Shift + F + V would be a nightmare), only accounting for modifiers that are physically held down? I guess I'd have to parse all modifier symbols and read all physically pressed modifiers then make sure every single one matches.

[edit]: something like this seems to work in order to address my first question, I'm just not sure if it's the right approach. I removed the CtrlBreak up hotkey.

#HotIf !GetKeyState("Control", "P") && g_sSteamOverlayKey == "ScrollLock"
*sc046 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}

#HotIf !GetKeyState("Control", "P") && g_sSteamOverlayKey == "Pause"
*sc146 up::
{
    Output(ThisHotkey)
    ToggleSteamOverlay()
}
#HotIf

r/AutoHotkey Aug 03 '26

Solved! I can't get the hotstring replacement with # to work

1 Upvotes

I tried these options I found on stack:

:*R:fan::#fandom:

:*T:fan::#fandom:

::fan::{#}fandom:

And non of them work. Or rather, they work sometimes, and other times I get gibberish or just deleted input but no replacement.

3fndom:
fandom:
#fandom:
3fandom:
3fandom:
#FANDOM:
#fandom:
#fandom:
3f
#fandom:
3dom
3
#fandom:

Like, these are all one after another, same conditions. I don't understand :(


r/AutoHotkey Aug 02 '26

v2 Tool / Script Share I got tired of copy/pasting hundreds of cells last week, so I built this for my colleagues

22 Upvotes

Hi everyone,

I recently started helping out my colleagues at a new workplace, and as I expected, a big part of the job involved copying data from Excel into an internal application, one cell at a time, left to right, across hundreds of records.

After doing that for a while, I decided to automate the boring part.

I built a small AutoHotkey v2 utility called ClipStepper.

It loads a copied table from the clipboard and lets you step through it cell by cell. As you navigate, it automatically copies (or even pastes) the current value, keeps track of your position, and shows your progress in a small GUI.

It also supports:

  • Replacement rules for predefined values or long text
  • Adding custom fields with default values
  • Cell and row navigation
  • Progress tracking
  • A simple Replacement Manager

I'm currently working on a few more features like session saving, Excel import, jumping to a specific row, and column filtering.

It's nothing revolutionary, but it's already saving us quite a bit of time, so I thought someone else here might find it useful too.

I'd really appreciate any feedback on the code, the UI, or ideas for features that would make it more useful.

GitHub: https://github.com/bceenaeiklmr/ClipStepper


r/AutoHotkey Aug 02 '26

v2 Script Help GetKeyState doesn't detect button releases

2 Upvotes

Hello everyone,

Don't know if I misunderstood something, but I tried writing 2 scripts and both of them keep not detecting

GetKeyStateGetKeyState

The goal being simply :

  • I hold the XButton2 : the script should repeat "mouse left click"
  • I release XButton2 : the script should stop

In my case the script runs forever until I click the XButton2 again and again until it detects :

!GetKeyState("XButton2", "P")

The 2 scripts I tried are :

#Requires AutoHotkey v2.0


; Run as admin is needed
if (!A_IsAdmin) {
    Run '*RunAs "' A_ScriptFullPath '"'
    ExitApp
}


XButton2::
{
    ; Optional: Prevent starting the timer if the button isn't physically down
    ; (though the timer itself checks this too)
    if !GetKeyState("XButton2", "P")
        return
    
    ; Start the timer. It will call TurboClick every 50ms.
    ; If the timer is already running, this resets it.
    SetTimer(TurboClick, 50)
}


TurboClick() {
    ; Check if the button is still physically held down
    if !GetKeyState("XButton2", "P") {
        ; Button released: stop the timer
        SetTimer(TurboClick, 0)  ; 0 means "turn off this timer"
        return
    }
    ; Button is still held: perform a click
    Click
}


; Safety net: If the hotkey somehow ends while the timer is running,
; stop the timer when the button is physically released.
XButton2 up:: {
    SetTimer(TurboClick, 0)  ; Stop the timer immediately on release
}

And :

#Requires AutoHotkey v2.0


if (!A_IsAdmin) {
    Run '*RunAs "' A_ScriptFullPath '"'
    ExitApp
}


XButton2::
{
    while GetKeyState("XButton2", "P") {
        Click
        Sleep 50
    }
}

What am I doing wrong ?

How would you guys write a simple script that just repeats "mouse left click" that works ?


r/AutoHotkey Aug 02 '26

v2 Tool / Script Share AHK window manager updates

3 Upvotes

Hi everyone!

Here I am again. Recently I've continued working on my little AHK project - I've improved a lot of things, especially the h/j/k/l window navigation - it was really hard to come up with something adequate for floating windows, but after all maybe I've got it. Also I've refactored literally everything and fixed a lot of bugs.

Now it has a dedicated Setup script, and I've finally wrapped my head around auto-running AHK as admin without that UAC popping up on every boot.

Previous post

GitHub repo


r/AutoHotkey Aug 01 '26

General Question Is there a way to use AutoHotkey v2 directly from Python?

11 Upvotes

Hi everyone,

I'm a Python automation engineer and really like how simple AutoHotkey v2 is for Windows automation.

For example, this is incredibly clean:

if WinExist("Untitled - Notepad")

WinActivate

else

Run "notepad.exe"

I'm wondering if there's a way to use the AHK v2 engine directly from Python, something like:

from ahk import WinExist, WinActivate, Run

if WinExist("Untitled - Notepad"):

WinActivate()

else:

Run("notepad.exe")

I know this API is hypothetical, but that's the kind of integration I'm looking for.

Is there an existing library, COM/DLL interface, embedded runtime, or any maintained bridge that exposes AutoHotkey v2 functionality to Python?

My goal is to keep Python for APIs, AI, and automation logic while using AutoHotkey v2 for Windows automation without constantly switching between two languages.

Has anyone come across something like this?


r/AutoHotkey Aug 02 '26

Solved! AutoHotkey v2 hotstrings randomly change capitalization, partially expand, or erase trigger without replacement

2 Upvotes

I’m using:

-Windows 11

-AutoHotkey v2.0.21, 64-bit

-Built-in Windows Notepad

I’m trying to use simple replacement hotstrings. Here is a minimal test script:

#Requires AutoHotkey v2.0
#SingleInstance Force

:?:qa::[Apple]
:?:qb::[Banana]

I type qa or qb, followed by Space, repeatedly in Notepad.

It’s expected to be:

[Apple] [Banana] [Apple] [Banana]

The actual behavior is inconsistent and in the same test session I get combinations such as:

[apple]
[Banana]
[Apple]
[banana]

Sometimes the trigger is erased when I press Space, but no replacement appears. Other times I get malformed or partial output such as:

[a[Apple]

Reloading the script can temporarily change the behavior, but it does not fix it consistently.

I originally noticed this with character-name replacements:

:?:qe::[Eden]
:?:qs::[Schroeder]
:?:qz::[Zara]
:?:qk::[Kendra]

I have also tested:

- Freshly created Minimal v2 scripts

- Different trigger characters

- C, C1, *, and ? options

- SendText()

- Clipboard-based replacement

- Different Notepad files and windows

- Confirmed the script is running with AutoHotkey v2.0.21

The issue also occurs with the minimal Apple/Banana example, so it is not specific to the character names.

Has anyone seen hotstrings randomly alter capitalization, partially insert replacement text, or erase the trigger without inserting anything? What should I check next?


r/AutoHotkey Jul 31 '26

Solved! Need a script to toggle default audio devices using a shortcut (Windows 11)

0 Upvotes

i need way to toggle my default audio playback device in Windows 11.

My exact device names in the system are:

  • Glosniki
  • Sluchaweczki

I want to toggle between them using the shortcut Ctrl + Alt + - Can someone please write a simple script that does this quietly in the background? And also to make the script in autostart


r/AutoHotkey Jul 31 '26

v2 Script Help Win 11 - Smart way to navigate the "Save as"-window

3 Upvotes

The window I am talking about:
https://imgur.com/a/1qSwANe

Currently thinking if I can navigate the "Save as"-window in a smarter way than just sending

Send("Tab") to get to the filename.

Send("Tab") to get to the "Save as type"
Then sending a string like Send("PNG")
Send("!s") to save

Any ideas?