u/-b-a-s-i-l-

Hi everyone, total newbie here

I initially installed AHK because I wanted to bypass some hardcoded keybinds in TES IV Oblivion.

I've succeeded making the remaps I wanted, but I realized there was no "Toggle sprint" option in the game, only "Hold".

So here I am trying to write a little script to make toggling possible, but I encountered a small problem.

What I want, basically, is that whenever I press the wheel button on my mouse, my character keeps sprinting without having to hold said wheel button.

I came accross this script which I adapted to my needs :

MButton::

{

static Toggle := 0

click( "{" ( toggle := !toggle ? "MButton down" : "MButton up" ) "}" )

}

Now, here's the problem : when I run the script, the first time I press the button, it works as intended. When I click a second time, it stops as intended.

But when I try to click a 3rd time, nothing's happening anymore !

I'm totally lost. I've tried resolving this on my own but with no success, so I hope some of you guys will be able to help ^^'

(ps: sorry for my english if there's any grammar mistakes)

reddit.com
u/-b-a-s-i-l- — 8 days ago

I don't know what just happened.

I installed AHK, ran it, tried writing a little script. Everything was fine.

I closed it, tried reopening it and then got this error :

Error: #Include file "ui-newscript.ahk" cannot be opened.

Line: 13

File: C:\Program Files\AutoHotkey\UX\ui-dash.ahk

The program will exit.

I didn't find any solution online, not even a single post addressing this specific issue, I'm about to lose my mind.

reddit.com
u/-b-a-s-i-l- — 8 days ago