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)