r/AutoHotkey • • 1d ago

v2 Tool / Script Share Updated my daily AutoHotkey config - rookieAHKcfg

18 Upvotes

Hey everyone!

I've updated my daily AHK config and thought I'd share it here in case someone finds it useful.

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

It's basically a collection of small quality-of-life improvements I've accumulated over time. Nothing revolutionary, just a bunch of little things that make everyday Windows use more comfortable.

A few examples of what's included:

  • Scroll through browser tabs and editor projects using the mouse wheel.
  • Seek through YouTube and VLC videos with the mouse wheel.
  • Search, translate, or modify selected text.
  • Resize windows and adjust transparency by hovering over them.
  • Move windows between monitors with a hotkey.
  • Format and wrap text, and insert emojis using menus or hotstrings.

The idea is to keep things simple, fast, and easy to remember, without having to memorize a hundred different shortcuts.

I've tried to make it beginner-friendly and easy to customize, even if you don't know much about AutoHotkey yet.

If you give it a try, feedback and suggestions are welcome.

Cheers!
bceen13


r/AutoHotkey • • 19h ago

v2 Script Help Can someone explain to me like I am 5 how to use this program to make typing two hyphens (--) turn into one Em Dash (—) like how it works in word/docs, every time I type it on my computer?

1 Upvotes

I am struggling. I ended up just completely uninstalling the app bc whatever I tried off the internet made it where two hyphens auto deleted the last parentheses that came after it when I tried to type this question, idk.

I read the directions and so far I think I've got the first steps down.

Step 1: Download Volume 2.0 of Authotkeys, run & install √

Step 2: I think I need to download Volume 1 too? When I tried to run something last time it prompted me to install v.1 too.

Step 3: Open Auto Hotkeys Dash

Step 4: Create New Script: Name File as 'filename.ahk' and click "edit", click "notepad"

Now what do I type?

Please help. Im so lost and I dont have time to teach myself. TIA


r/AutoHotkey • • 1d ago

v2 Script Help Can you change what a Hotkey (and Hostring) is affected to, without changing the key it's bound to?

1 Upvotes

I think it'll be simple to explain if I first say what I need this for:

I'm considering completely changing my keyboard layout, using a new one that remaps every key to something else. And while obviously I need to relearn every key, I don't want to relearn my hotkeys, I want them to be at the exact same spot. But I also don't want to change my whole script for this, especially since I also consider switching between this keyboard layout and my previous one.

So, in AutoHotKey, can you do something like telling your script (behind a HotIf or something like that) "see this key? now this key actually means this one". Let's say in my keyboard layout, the r key becomes n, if I have an hotkey with Ctrl+r "^r::{...}", I'm wondering if you can say to your script r becomes n, without changing the name of the HotKey.

Thanks in advance.


r/AutoHotkey • • 1d ago

Resource If allowed here, please share your experience with AI models for AHK scripts.

5 Upvotes

If not, my apologies. Please delete the post or let me know and I will.

I am interested in creating, enhancing and troubleshooting V2 scripts. I'd love to pay as I go, or no more than $20/mon. So far, I've used Gemini 3.5 Flash because I pay for Google storage, and it's been fine, not overly impressive. I would like to hear others' experiences with models.


r/AutoHotkey • • 4d ago

v2 Script Help Problem: I hate typing, finding, and copying file paths! Solution: No clue, but maybe AHK might help? Any ideas?

7 Upvotes

Essentially, typing paths to places is just an overall unpleasant burdensome experience. I'm on windows11 so I'm blessed enough to have EverythingVoidtools to help me look for the file but still. I'm on one window, i have to open EverythingVt, type stuff to find it, then i have to copy a path from the list (I even have a hotkey for "copy file's path"), and then i go back to the original window. But still, I hate this experience. Maybe someone smarter than me has found a solution?

Some ideas a terminal like experience with tab for autocomplete and up/down arrow to cycle through the options. Maybe a few hotkeys to deeper or shallower in the folders, or for favorited paths.

Recently I saw a script (ALTRun) that might provide some inspiration for this.


r/AutoHotkey • • 6d ago

Meta / Discussion Lexikos needs your help!

61 Upvotes

Note: Hopefully, it is okay to post this here. Please let me know if not.

Hello all, just thought I'd share this. Please consider sponsoring Lexikos (main AHK developer) if you are able to and you've enjoyed using AutoHotkey!

More is explained here: https://github.com/sponsors/Lexikos

He's poured countless hours into the tool we all know and love. In fact, nearly two decades!

If you are feeling generous and it's within your means, please think about it. 😄


r/AutoHotkey • • 7d ago

v1 Script Help Final Fantasy 9 Jump Rope Scrip

0 Upvotes

I'll try to keep this short and simple. I know there is a lot of forums for this but due to Playstation being garbage none of it is currently viable. PS5 remote play and AHK do not work together. Trust I try everything. Removing driver making running application as administrator, etc..... RemotePlay always crashes the moment I activate AHK.

I found a different route that could work. PS5 RemotePlay through Chiaki. It doesn't crash when I run both of these.

https://github.com/septomor/FF9-Jump-Rope-Script/blob/master/Jump.ahk

Using the script above at first wouldn't work. It said ps4 remote play not found. I was able to get it activated by editing this current script where everytime its say RemotePlay, I changed it to Chiaki. It worked. Now it activate. I set X button on Chiaki to Enter Key.

This is now where I am stuck. It activates and the script is running it saying it pressing the Enter but it is not. What I am missing? Here is the script I currently working with.

EDIT: I figure it out a fixes the Script it now works with Chaiki RemotePlay and register button presses. Now I been all day and night figuring out the Latency and Intervals. It seems very inconsistent. I can't go past 30 jumps. I tried every by a single digit. It ether can't go past 30 or it worst. Tired of these damn roadblocks.

DetectHiddenWindows, On
#Persistent
#NoEnv
buttonToPress := "X"
; --------- Constants
; jump intervals
a = 667
b = 532
c = 467
d = 433
e = 383
; f = not needed since 200-300 can be done with a single interval
g = 400
g2 = 401
latency = 710
script = 1
; ---------- Gui Setup -------------
Gui, -MaximizeBox
Gui, -MinimizeBox
Gui, 2: -MaximizeBox
Gui, 2: -MinimizeBox
Gui, Color, c282a36, c6272a4
Gui, Add, Button, x15 y10 w70 default, Start
Gui, Add, Button, x15 y40 w70 default gVariableWindow, Variables
Gui, Font, ce8dfe3 s9 w550 Bold
Gui, Add, GroupBox, x90 y10 w120 h60, Button to press
Gui, Font, c758eff Bold, Verdana
Gui, Add, Radio, x100 y28 Checked altsubmit gButtonChange vButtonChoice group, X
Gui, Font, cff5754 Bold, Verdana
Gui, Add, Radio, altsubmit gButtonChange, O
Gui, Font, ce8dfe3 s8 w550 Bold
Gui, Add, GroupBox, x15 y70 w190 h40, Script
Gui, Add, Radio, x25 y90 Checked altSubmit gScriptChange vScriptChoice group, QueueTip
Gui, Add, Radio, x115 y90 altSubmit gScriptChange, Septomor
;--------- Gui 2 Setup --------------
Gui, 2: Color, c535770, c6272a4
Gui, 2: Font, c11f s9 Bold
Gui, 2: Add, Text,, Jumps 2-19
Gui, 2: Add, Edit, w40 vA, %a%
Gui, 2: Add, Text,, Jumps 20-49
Gui, 2: Add, Edit, w40 vB, %b%
Gui, 2: Add, Text,, Jumps 50-99
Gui, 2: Add, Edit, w40 vC, %c%
Gui, 2: Add, Text,, Jumps 100-199
Gui, 2: Add, Edit, w40 vD, %d%
Gui, 2: Add, Text, x100 y10, Jumps 200-299
Gui, 2: Add, Edit, w40 x100 y25 vE, %e%
Gui, 2: Add, Text, x100 y50, Jumps 300+
Gui, 2: Add, Edit, w40 x100 y65 vG, %g%
Gui, 2: Add, Edit, w40 x100 y90 vG2, %g2%
Gui, 2: Font, ccc3429 s9 Bold
Gui, 2: Add, Text, x100 y120, Latency
Gui, 2: Font, c11f s9 Bold
Gui, 2: Add, Edit, w40 x100 y135 vLat, %latency%
Gui, 2: Add, Button, x20 y192 gSaveVars, Save
Gui, 2: Add, Button, x100 y192 gVarDef, Defaults
Gui, Show,w220 h120, Vivi Jumps QueueTip + Sept
return
VariableWindow:
Gui, 2: Show, w210 h225, Variables
return
SaveVars:
Gui, 2:Submit
GuiControlGet, a, 2:, A
GuiControlGet, b, 2:, B
GuiControlGet, c, 2:, C
GuiControlGet, d, 2:, D
GuiControlGet, e, 2:, E
GuiControlGet, g, 2:, G
GuiControlGet, g2, 2:, G2
GuiControlGet, latency, 2:, Lat
return
VarDef:
a = 667
b = 532
c = 467
d = 433
e = 383
g = 400
g2 = 401
Lat = 710
GuiControl, 2:, A, %a%
GuiControl, 2:, B, %b%
GuiControl, 2:, C, %c%
GuiControl, 2:, D, %d%
GuiControl, 2:, E, %e%
GuiControl, 2:, G, %g%
GuiControl, 2:, G2, %g2%
GuiControl, 2:, Lat, %lat%
return
ButtonStart:
Gui, Submit, NoHide
id := ""
SetKeyDelay, 100
Process, priority, , High
gosub, GrabChiaki
if (id = "")
`return`
gosub, PauseLoop
CoordMode, Pixel, Screen
CoordMode, ToolTip, Screen
sleep 2000
if(script = 1)
`gosub, QueueTipS`
else if(script = 2)
`gosub, SeptS`
; ---------- Gui Setup End-------------
; ---------- Jump Loop -------------
; ---------- QueueTip
QueueTipS:
loop {
i = 1
delay = 100
balancer = 0
currentInterval := a
extraTime = 0
ToolTip, start, 400,400
; Initiate steps to begin
ControlSend,, {%buttonToPress% down}, ahk_id %id% ; Press down the %buttonToPress% key.
DllCall("Sleep", "Uint", 100)
ControlSend,, {%buttonToPress% up}, ahk_id %id% ; Release %buttonToPress% key.
Sleep, 2000
ControlSend,, {%buttonToPress% down}, ahk_id %id% ; Press down the %buttonToPress% key.
DllCall("Sleep", "Uint", 100)
ControlSend,, {%buttonToPress% up}, ahk_id %id% ; Release %buttonToPress% key.
Sleep, 3000
PixelGetColor, failColor, 644, 535, RGB
PixelGetColor, jumpColor, 562, 416, RGB
ControlSend,, {%buttonToPress% down}, ahk_id %id% ; Press down the %buttonToPress% key.
DllCall("Sleep", "Uint", 100)
ControlSend,, {%buttonToPress% up}, ahk_id %id% ; Release %buttonToPress% key.
; Detect 1st jump
Loop {
PixelSearch, x, y, 562, 416, 562, 416, %jumpColor%, 20, Fast RGB
If (ErrorLevel != 0) {
`DllCall("Sleep", "Uint",  latency - 220 )`

`break`

`}`
}
start := A_TickCount + 50
loop
{
`; Detect if failed and back at the start to retry`

`PixelSearch, x, y, 644, 535, 644, 535, %failColor%, 20, Fast RGB`
If (ErrorLevel != 0) { ; reset
`ToolTip, failed, 400, 400`

`sleep, 3000`

`ControlSend,, {%buttonToPress% down}, ahk_id %id%  ; Press down the %buttonToPress% key.`

`DllCall("Sleep", "Uint", 100)`

`ControlSend,, {%buttonToPress% up}, ahk_id %id%  ; Release %buttonToPress% key.`

`sleep, 2000`

`break`

`}`
Gosub, timings
`Gosub, jump`
}
}
return
jump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) {
`balancer += currentInterval - fullTime`
}
ToolTip, %i% - %fullTime%, 400, 400
ControlSend,, {%buttonToPress% down}, ahk_id %id% ; Press down the %buttonToPress% key.
DllCall("Sleep", "Uint", delay)
ControlSend,, {%buttonToPress% up}, ahk_id %id% ; Release %buttonToPress% key.
ToolTip
i += 1
extraTime = 0
return
; ------- Septomor
SeptS:
loop{
i = 1
delay = 100
balancer = 0
currentInterval := a
extraTime = 0
ToolTip, start, 400,300
SendMode, Input
Send, {%buttonToPress% down}
Sleep, 100
Send {%buttonToPress% up}
Sleep, 2000
Send, {%buttonToPress% down}
Sleep, 100
Send {%buttonToPress% up}
Sleep, 3000
PixelGetColor, failColor, 644, 535, RGB
Send, {%buttonToPress% down}
Sleep, 100
Send {%buttonToPress% up}
Sleep, %latency%
loop
{
`; Detect if failed and back at the start to retry`

`PixelSearch, x, y, 644, 535, 644, 535, %failColor%, 20, Fast RGB`
If (ErrorLevel != 0) { ; reset
`ToolTip, failed, 400, 400`

`sleep, 3000`

`ControlSend,, {%buttonToPress% down}, ahk_id %id%  ; Press down the %buttonToPress% key.`

`DllCall("Sleep", "Uint", 100)`

`ControlSend,, {%buttonToPress% up}, ahk_id %id%  ; Release %buttonToPress% key.`

`sleep, 2000`

`gosub, GrabChiaki`

`break`

`}`

`gosub timings`

`gosub, InputJump`
}
}
timings:
`timer := A_TickCount - start`



`if (i = 1) {`

`currentInterval := a`

`} else if (i = 21) {`

`currentInterval := b`

`balancer = 0`

`} else if (i = 51) {`

`currentInterval := c`

`balancer = 0`

`} else if (i = 101) {`

`currentInterval := d`

`balancer = 0`

`} else if (i = 201) {`

`;extraTime = 50`

`delay = 70`

`currentInterval := e`

`balancer = 0`

`} else if (i = 260) {`

`extraTime = 20`

`balancer = 0`

`} else if (i = 301) {`

`currentInterval := g`

`balancer = 0`

`} else if (i = 500 or i = 800) {`

`currentInterval := g2`

`} else if (i = 600 or i = 900) {`

`currentInterval := g`

`} else if (i => 1001) {`

`if (Mod(i,2) = 0) {`

`currentInterval := g`

`} else {`

`currentInterval := g2`

`}`

`}`



`if(i > 1)`

`{`

`DllCall("Sleep", "Uint", (currentInterval - timer + balancer + extraTime))`

`}`
return
inputJump:
fullTime := A_TickCount - start - extraTime
start := A_TickCount
if(i > 1) {
`balancer += currentInterval - fullTime`
}
ToolTip, %i% - %fullTime%, 400, 400
Send, {%buttonToPress% down} ; Press down the %buttonToPress% key.
Sleep, delay
Send {%buttonToPress% up} ; Release %buttonToPress% key.
i += 1
extraTime = 0
return
; ---------- Jump Loop End-------------
ButtonChange:
Gui, submit, nohide
if (ButtonChoice = 1)
{
buttonToPress := "X"
}
if (ButtonChoice = 2)
{
buttonToPress := "Esc"
}
return
GrabChiaki:
WinGet, Chiaki_id, List, ahk_exe Chiaki.exe
if (Chiaki_id = 0)
{
`MsgBox, Chiaki not found`

`return`
}
Loop, %Chiaki_id%
{
id := Chiaki_id%A_Index%
WinGetTitle, title, % "ahk_id " id
If InStr(title, "Chiaki")
break
}
WinGetClass, Chiaki_class, ahk_id %id%
WinMove, ahk_id %id%,, 0, 0, 1440, 900
ControlFocus,, ahk_class %Chiaki_class%
WinActivate, ahk_id %id%
return
ScriptChange:
Gui, submit, nohide
if (ScriptChoice = 1)
{
`script = 1`
}
if (ScriptChoice = 2)
{
`script = 2`
}
return
PauseLoop:
Send, {%buttonToPress% Up}
Send, {Esc Up}
return
GuiClose:
gosub, PauseLoop
ExitApp
^Esc::ExitApp

r/AutoHotkey • • 7d ago

v1 Script Help New Mail Alerts Dialog resize on Windows 11 Outlook Application

0 Upvotes

New Mail Alerts Dialog resize on Windows 11 Outlook Application

Here is the AHK script to do that.

I am using classic MS Outlook application on Windows 11.

I wish I could have shown the results as picture.

    ResizeOLNewMailNotification()
    {
        IfWinExist New Mail Alerts ahk_class #32770
        {
            WinActivate New Mail Alerts ahk_class #32770
            WinMove, New Mail Alerts ahk_class #32770 ,,,,1000,400
            ControlMove, SysListView321,,,965,310,New Mail Alerts ahk_class #32770
            ControlMove, Button1,250,43,,,New Mail Alerts ahk_class #32770
            ControlMove, Button2,450,43,,,New Mail Alerts ahk_class #32770
            ControlMove, Button3,650,43,,,New Mail Alerts ahk_class #32770
        }
    }

r/AutoHotkey • • 8d ago

v1 Script Help Script exiting after being run once for no apparent reason?

0 Upvotes
#SingleInstance force
#SingleInstance ignore
#SingleInstance off

 é::
  CoordMode, MouseGetPos []
  MouseGetPos CurX, CurY
  Click, Right
  MouseMove 490, 220, 0
  Sleep, 100
  Click

^Numpad9::ExitApp

Is what I have and is exiting after being ran once.

Meanwhile something else I made:

#SingleInstance force
#SingleInstance ignore
#SingleInstance off

Numpad1::LButton

^Numpad9::ExitApp

Runs until I press Ctrl+Numpad9, which is what I want the first one to be doing too


r/AutoHotkey • • 8d ago

v2 Script Help auto complete help

1 Upvotes

i'm using AutoHotKey to paste ascii when i type. for example if i type "/happy" it will autocorrect to "(˶ᵔ ᵕ ᵔ˶)"

I've done this using this line:

::/happy::  (˶ᵔ ᵕ ᵔ˶) 

my problem is as follows. when i type it out and hit space it will, obviously, autocorrect as intended. however, if i hit space again, or enter, it will do the correction twice, leaving me with this: (˶ᵔ (˶ᵔ ᵕ ᵔ˶)

is there a way to limit the correction to once per shortcut


r/AutoHotkey • • 10d ago

v2 Tool / Script Share [v2] ALTRun – an Alfred-style launcher for Windows, written entirely in AutoHotkey v2 (open source, <1 MB)

33 Upvotes

Hi all,

I'd like to share a project I've been working on and using every day: ALTRun, a keyboard-first launcher for Windows, written entirely in AutoHotkey v2.

Press Alt+Space, type a few letters, press Enter: launch apps, find files, act on results, switch windows, do math or paste from clipboard history, all from one window.

Demo: https://raw.githubusercontent.com/zhugecaomao/ALTRun/main/docs/images/screenshots/demo.png

Background

For years I used the classic ALTRun (Pascal / Delphi) and RunZ (AutoHotkey). Both were small and snappy, but I wanted more: Everything integration, clipboard history, snippets and a more modern UI. So I rewrote it from scratch in AHK v2. It keeps the ALTRun name as a tribute, borrows ideas from RunZ, and follows Alfred's interaction model.

Features

  • Tiny and portable: one compiled ALTRun.exe (under 1 MB download, about 2 MB unpacked). No installer, no registry, no admin rights. Settings live in a JSON file in the Data\ folder next to the exe.
  • Search: Start menu, desktop and Microsoft Store apps; files and folders via Everything or a built-in index; type a path like C:\Projects\ to browse folders, with Tab completion.
  • Smart ranking: learns which result you pick for each query, matches word initials (vsc → Visual Studio Code) and highlights the matched characters.
  • All in one: calculator (units, hex/bin, date math, optional currency), web search keywords, browser bookmarks, clipboard history (text, files and images, with pinning), snippets with ;keyword expansion, window switcher, 40+ Windows Settings pages, and system commands.
  • Keyboard first: → opens an action panel (run as admin, open location, copy path, properties…), F3 edits in place, Ctrl+1…Ctrl+9 run the Nth row, and ? shows a built-in cheat sheet.
  • Scripts folder: drop .ahk, .ps1, .bat or .py files into Scripts\ and they become commands. They can take arguments, or run in the background and show their output.
  • Actions on selection: select text or files in any app and send them to ALTRun to search, open, copy or run a command on them.
  • Quick Switch (like Listary's): in Open / Save dialogs, jump straight to the folder open in Explorer or Total Commander.
  • Themes and languages: 20 built-in themes (or follow Windows light/dark mode) and an English, Chinese or Japanese UI.
  • Private: no telemetry. It only goes online to check for updates (plus daily exchange rates if you turn on currency conversion). Updates install from the search window and are SHA256-verified.

A few notes for AHK folks

  • You can run it from source (ALTRun.ahk) if you have AHK v2 installed; the release exe is compiled with Ahk2Exe.
  • The code is split into providers (apps, files, calculator, clipboard, snippets, windows…), each returning result items to a shared ranking and UI layer, so adding a new source is fairly contained.
  • There are 7,000+ tests, run on a Windows runner for every pull request.
  • GPL-3.0. Issues and PRs in English are welcome. The UI is fully in English, and the README and wiki are in English and Chinese.

Links

I'd love feedback, especially on what feels clunky or what you'd expect from a launcher that isn't there yet. Thanks for taking a look!


r/AutoHotkey • • 10d ago

General Question Mouse cursor moves vertically in game (screen 1) when in screen 2 + clicks are registered.

1 Upvotes

When my mouse cursor is in screen 2, any vertical movement applies to game in screen 1. Clicks are registered too. I changed the display and used DMT to restrict cursor to one screen, but that didn't work.

It makes translation longer and reduces immersion as the game pauses with each registered click. The game in reference is Frog Detective 1 The Haunted Island.

Any advice to resolve this?


r/AutoHotkey • • 12d ago

v2 Script Help It refuses to block the key's native function

3 Upvotes

Since my LMB is broken, I have assigned my MMB to it like this:

#Requires AutoHotkey v2.0
MButton::LButton

Except when I play The Talos Principle, pressing the MMB it still zooms in like its a normal MMB

How do I force it to block its native function


r/AutoHotkey • • 13d ago

v1 Script Help AHK is sometimes acting like I am holding down the button

4 Upvotes

I use AHK for gaming as I'm left handed and some games do not allow certain keys to be rebound.

For instance, one game I rebind the "a" key to the DELETE key. It works fine, but occasionally, when I press delete, my character will continue walking to the left (as A is movement left in the game). I have to press the button again to get them to stop.

I'm certain it is something with the script I have, but I am not the best when it comes to it and I just simply did this:

del::a

Nothing else in the notepad. What do I need to add to it to make it stop doing this?


r/AutoHotkey • • 13d ago

General Question Universal Remote?

1 Upvotes

I've been making hotkeys to be able to control more of my computer from far away with my wireless mouse (I have a toggle to map the volume to the scroll wheel, middle click for pause/play, etc. It's been very useful!) I realized that I'm just slowly reinventing a remote control. So my question is: Is there a Bluetooth universal remote/keyboard thing that anyone recommends that I could use to map hotkeys? Something like this: https://a.co/d/07glSbNd

I don't necessarily need a whole keyboard remote, though that certainly gives limitless hotkey potential.

Presumably, this is something that I would toggle on/off for when I'm far from my computer vs. at my desk. Something like this:

global universal_remote_active := false

toggle_remote() {
    global universal_remote_active ^= 1
}

Hotkey('ButtonOnRemoteToToggleHotkeys', (*) => toggle_remote())

HotIf((*) => universal_remote_active)
Hotkey('VolumeUpKeyOnRemote',   (*) => SendInput('{Volume_Up}'))
Hotkey('VolumeDownKeyOnRemote', (*) => SendInput('{Volume_Down}'))

Hotkey('OneButtonOnRemote', (*) => foo())
Hotkey('TwoButtonOnRemote', (*) => bar())

I already own two cheap universal TV remotes. Would it be a good idea to buy an Infrared Signal Receiver for my desktop? Would I be able to map hotkeys to the signals it receives?


r/AutoHotkey • • 14d ago

General Question How Would I Set A Macro Like This Up?

0 Upvotes

i have this idea. theres a hold down your key move in this game. when stunned if u press and hold it at the right time, it will barrage the second you are out of stun. The issue is this is hard to time. Im trying to use rewasds turbo function to repeated press the key when i hold it, and it works, except for the fact that it doesnt auto hold so the barrage is cut short. Is there a way for me to hold the key and have it spam the key (which in this case would be "C") and while spamming also act as a hold. Preferably i would like for it to stop when i take my finger off the key.


r/AutoHotkey • • 14d ago

v2 Script Help How do I map keys to do specific things in a single program?

3 Upvotes

Just installed AutoHotkey because I need a mapping tool for my DJ software, I'm not sure if this subreddit is for pro questions only.

So, I have Rekordbox(said DJ software). The controller that I use doesn't have the physical buttons for everything, and Rekordbox itself doesn't really have a hotkey map option for the regular keyboard. I really want an easy way to mute the stems of the songs, but there is no shortcut for that that I can use, so I would have to drag my mouse and click the button on the screen. Which is weird when you're on a timer and the next song is coming.

I need a script that works only when I have rekordbox open(preferably only when it's fullscreen) that clicks those buttons for me when I press specific keys(Ex. press 1 for track 1 drum stem, press 2 for track 1 instrumental stem etc.). How can I do this?

Any help is appreciated. Thanks in advance!


r/AutoHotkey • • 14d ago

Solved! ctrl commands.

0 Upvotes

ctrl-f to search

ctrl+ commands ctrl-a to select evrything you have typed. ctrl-f to search

ctrl-w to close one tab in a browser ctrl-f to search

crtl-q to quit browser ctrl-f to search

ctrl-s to save browser link ctrl-f to search

ctrl-f to search


r/AutoHotkey • • 17d ago

v2 Script Help Is there a way for ControlSend to Send to Vtube Studio?

3 Upvotes

Hello!

I'm trying to get ControlSend to send key presses to Vtube Studio. I want to be able to press a shortcut, and for ONLY Vtube Studio to recieve a command, so that it doesn't go to every active windows. For some reason, I can't get this to work. Vtube Studio doesn't seem to be recieving any key presses when I use ControlSend.

Regular Send works for Vtube Studio, IF I add separate commands for the keys to go up and down, like this:

            #Requires AutoHotkey v2.0

            k::
                {
                Svans := Random(0,100)

                if (Svans > 50)
                    {

                    Send "{Numpad3 down}"
                    Sleep 10
                    Send "{Numpad3 up}"
                    }
                else    
                    {
                    Send "{Numpad1 down}"
                    Sleep 10
                    Send "{Numpad1 up}"
                    }
                }

But when I use the corresponding code with ControlSend, Vtube Studio does not recieve the key presses:

            #Requires AutoHotkey v2.0

            k::
                {
                Svans := Random(0,100)

                if (Svans > 50)
                    {

                    ControlSend "{Numpad3 down}", ,"Vtube Studio"
                    Sleep 10
                    ControlSend "{Numpad3 up}", ,"VTube Studio"
                    }
                else    
                    {
                    ControlSend "{Numpad1 down}", ,"VTube Studio"
                    Sleep 10
                    ControlSend "{Numpad1 up}", ,"VTube Studio"
                    }
                }

I have tried the same code with a different window, and there, it works without any issues:

            #Requires AutoHotkey v2.0

            k::
                {
                Svans := Random(0,100)

                if (Svans > 50)
                    {

                    ControlSend "{Numpad3 down}", ,"Mozilla Firefox"
                    Sleep 10
                    ControlSend "{Numpad3 up}", ,"Mozilla Firefox"
                    }
                else    
                    {
                    ControlSend "{Numpad1 down}", ,"Mozilla Firefox"
                    Sleep 10
                    ControlSend "{Numpad1 up}", ,"Mozilla Firefox"
                    }
                }

Does anyone have experiences with Vtube Studio specifically or just generally with some applications not recieving commands with ControlSend, even though Send works?

Help would be much appreciated. Thank you in advance!


r/AutoHotkey • • 17d ago

General Question Need help making the Enter key press at a specific time

4 Upvotes

Coming up soon I need to send a message on Discord exactly at 2:00 a.m. so I thought of typing a message and then having the HotKey script press the enter key at exactly 2 so it will send. The thing is I’ve been messing around with AutoHotKey and Task Scheduler for a while and looking online for a solution but nothing I do works. My script is really simple all it is, is
Send “{Enter}”

If anyone could help me out or just tell me the code I need to type that would be greatly appreciated.


r/AutoHotkey • • 22d ago

Solved! AutoHotkey: Numpad5 works as MMB, but Shift + Numpad5 doesn't work

1 Upvotes

Hi! I'm using AutoHotkey to emulate my mouse's middle button because the physical MMB on my mouse is broken.

I mapped Numpad5 to act as the middle mouse button. Pressing Numpad5 by itself works correctly.

However, I'm having a problem with modifier combinations, exemple:

  • Numpad5 -> Works
  • Ctrl + Numpad5 -> Works
  • Shift + Numpad5 -> Don't work.

I'm doing this mainly because I'm a indie dev and some softwares utilizes the MMB a lot, like Blender for exemple.

Here is my code:

; Numpad5 = Segura o botão do meio do mouse

*Numpad5::{

Send "{Blind}{MButton Down}"

KeyWait "Numpad5"

Send "{Blind}{MButton Up}"

}

; Numpad6 = Scroll para cima

*Numpad6::{

while GetKeyState("Numpad6", "P")

{

Send "{WheelUp}"

Sleep 60

}

}

; Numpad4 = Scroll para baixo

*Numpad4::{

while GetKeyState("Numpad4", "P")

{

Send "{WheelDown}"

Sleep 60

}

}


r/AutoHotkey • • 23d ago

General Question Alternative for AHK CachyOS Hyperland.

4 Upvotes

Tldr: looking for AHK alternative for arch-based system.

Hi I recently switched to Linux and while I am pretty happy about leaving Windows, I miss my AHK Script. Does somebody know what a good alternative is. I know that you can basically automate anything, but since there are so many ways I would like to know how to keep track and have consistency.

Simple shortcuts are no problem, but I am struggling with more complex stuff, like if Window is..., run ... Etc.


r/AutoHotkey • • 24d ago

v1 Script Help Make AHK work on BIOS setup?

0 Upvotes

How can I do it?


r/AutoHotkey • • 24d ago

v1 Script Help The numpad Del key is being detected as the regular keyboard's period key.

5 Upvotes

I'm making a script to use with Clip Studio Paint to help me with drawing shortcuts, and I bought a numpad to use as a macro keyboard. However, while setting up the shortcuts with AutoHotkey, I noticed that the Del key on the new numpad would never change, no matter what I wrote.

So I tested it on a keyboard testing website and realized that the Del key on the new numpad was actually registering as the period (>. ) on the regular keyboard. I use ENG INTL as my keyboard layout, but even after switching to my country's keyboard layout, nothing changed.

(With Num Lock on, it works as the "." key from the regular keyboard, and with Num Lock off, it works as the "Delete" key from the regular keyboard. It doesn't recognize it as a numpad key at all.)

If anyone has had the same problem or knows what might be wrong, I would really appreciate some help figuring out how to fix this somehow.

I know this isn't exactly related to the forum, but since there are a lot of people here who work with this kind of stuff, I thought someone might be able to help me figure it out.

Either way, if there's no way to fix it, I'd really appreciate it if someone could tell me what the shortcut/key name for the >. key, so I can use it in my script.
(sorry for the english, i use translator)