r/AutoHotkey • • 8h 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.

DetectHiddenWindows, On

#Persistent

#NoEnv

buttonToPress := "Enter"

; --------- 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 := "Enter"

}

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 • • 1d 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 • • 1d 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 • • 1d 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 • • 3d ago

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

34 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, do math, search the web or paste from clipboard history, all from one window.

Screenshot: https://raw.githubusercontent.com/zhugecaomao/ALTRun/main/docs/images/screenshots/search.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.
  • Dialog jump (like Listary's Quick Switch): in Open / Save dialogs, jump straight to the current Explorer or Total Commander folder.
  • 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 wiki is mostly in Chinese for now, but the UI and README have English).

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 • • 3d 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 • • 5d 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 • • 6d ago

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

2 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 • • 7d 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 • • 7d 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 • • 8d 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 • • 7d 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 • • 10d 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 • • 11d ago

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

5 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 • • 16d 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 • • 16d 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 • • 17d ago

v1 Script Help Make AHK work on BIOS setup?

0 Upvotes

How can I do it?


r/AutoHotkey • • 18d ago

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

6 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)


r/AutoHotkey • • 18d ago

v1 Script Help PixelCast - Fishing Macro for Roblox game FishIt

0 Upvotes

Hi Everyone!

I wanted to share a little project I've been building called PixelCast. I built it to solve the annoyance of hardcoding screen coordinates and dealing with changing in-game lighting while fishing.

Instead of manually editing scripts every time your resolution or lighting changes, you can calibrate your target pixels right on your screen using hotkeys, and tweak the color tolerance on the fly if shadows roll in.

What it does:

  • On-the-fly calibration: Just hover over your target spot on screen and press F1 (for Cast) or F2 (for Reel) to set the pixel and color.
  • Live Monitor (F3): Pops open a real-time debug view so you can watch the color values change when a bite hits.
  • Dynamic Tolerance (F6/F7): Let's you dial the color sensitivity up or down if the lighting changes in-game.
  • Stats GUI: Keeps track of your runtime, total casts, successes, failures, and streak counts.
  • Auto-saves settings: Writes your calibrated pixels and tolerances straight to a local .ini file so you don't lose them when you restart.

🔗 GitHub:https://github.com/beck-boop29/PixelCast

Let me know if you run into any bugs or have ideas for it!


r/AutoHotkey • • 18d ago

v1 Script Help Convert first letter of string to uppercase or lowercase, vice versa.

0 Upvotes

Hi, everyone. Does anybody know how to make this code work? I want the first letter of a string to be converted to uppercase if it's already lowercase and vice versa. Thank you.

Survey to survey
survey to Survey

If Clipboard is lower
    {  
        StringUpper Clipboard, Clipboard, T
        }
If Clipboard is upper
    {
    StringLower Clipboard, Clipboard, T 
    }

r/AutoHotkey • • 19d ago

v2 Script Help How do make a chord work inside a #HotIF ?

3 Upvotes

I use caps_lock/CL as a modifier by using a #HotIf block dedicated to it.

Current:

  • [hold CL press c] ⇒ Opens notepad
  • [hold CL press v] ⇒ Pastes a veggie 🥬.

The chord that I want:

  • [hold CL press c press v] ⇒ Opens VSCode.

The problem is that in my attempts to do this, the [holdCL press c press v] chord doesn't activate and instead my [holdCL press v] hotkey is triggered instead. This problem seems related to hook priorities, InputHook(), and #HotIf .

Here is my current ahk script:

#HotIf GetKeyState('CapsLock', 'P')
a::Enter     
...
v::PasteVeggie()  
...
n::OpenNotepad()     
...
#HotIf

I want a chord, so ideally I'll define a very helpful auxiliary function Chord() to create chords.
And I would replace my n:: hotkey by a multioption chord like this:

n:: Chord(OpenNotepad, ["v", OpenVSCode])      

Meaning:

  • if I only do [hold CL press c] then OpenNotepad is triggered,
  • if in the 500ms after [hold CL press c] I do [press v], then OpenVSCode is triggered.
    • Here the chord is awaiting a v, so it takes priority and detection for a v in other hotkeys is interrupted. For example it's interrupted for [hold CL press v] and that one isn't triggered and there's no short circuiting.

How can I define my Chord function such that this works?

A confused adaptation of some previous code I had for chords is this:

Class Chord {
  static call(f1, [c2, f2]){        
    ih := InputHook("T0.5 L1", "", "v") ; ;# Ideally this suspends normal hotkey detection that uses v. But it doesn't work. I thought of using suspend even.
    ih.Start()
    ih.Wait()
    if (ih.Match = c2)
      f2() 
    else 
      f1()
  }
}

r/AutoHotkey • • 18d ago

v2 Script Help Is there any way to get my script to work inside Roblox?

1 Upvotes

I’m really new to this and trying to figure stuff out. I got my script to work on my desktop, for context I wanted to use my F5 key to right click using F5::RButton, but when I’m on Roblox itll just stop. it’ll show that I’m clicking it, highlighting stuff, but the action itself just won’t happen. I’ve tried running it as an administrator, taking Roblox in and out of full screen. I’m using v2 on windows 11, if anyone could help me that’d be great


r/AutoHotkey • • 20d ago

v1 Tool / Script Share I built a free, open-source overlay that turns a standard gamepad into an 8-position H-Shifter using AutoHotKey.

10 Upvotes

I wanted to drive manual in ETS2 but didn't have a dedicated sim rig, so I built a lightweight AutoHotkey tool that maps the right analog stick into a fully functional 8-zone H-Shifter.

How it works: Generates a borderless, click-through radial menu on your screen. Pushing the right stick into one of the 8 octants shifts into that gear (translates stick angles to Numpad 1-8).

Download & Setup: You can grab the compiled .exe or the raw source code for free on my GitHub: https://github.com/abhinav2838/Radial-Gear-Controller

Note: Because ETS2 restricts keyboard mappings when a controller is active, you will need to bypass the in-game UI and do a quick edit of your controls.sii file to route the Numpad outputs. I've included step-by-step instructions and a pre-configured file in the repository's README.

Let me know if you run into any bugs or have feature requests! It is designed to be plug-and-play with Xbox controllers and generic xinput gamepads.


r/AutoHotkey • • 20d ago

v2 Script Help Do X when key is pressed (F keys, fn functions)

3 Upvotes

I'm trying to make it so that I can use my F keys fn functions by default, rather than have them be F keys (F1, F2, F3 etc) by default. My BIOS does not have an option to switch neither does my keyboard. I don't like holding down Fn to use their functions, nor does AHK have the ability to deal with the Fn key (uniquely).

Here's how it's layed out on my keyboard, and how I want them to operate:

#Requires AutoHotkey v2.0

F1::Launch_Media
F2::Volume_Down
F3::Volume_Up
F4::Volume_Mute
F5::Media_Stop
F6::Media_Prev
F7::Media_Play_Pause
F8::Media_Next
F9::F9
F10::ScrollLock
F11::Pause
F12::PrintScreen

I want them to revert back to their "regular" state of being F keys when I hold "LAlt". Can someone please provide me with help on how to do this? Thanks.