Mouse Wheel Pressed Down

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
izey17
Posts: 5
Joined: 01 Aug 2017, 13:29

Mouse Wheel Pressed Down

01 Aug 2017, 13:43

Hi.
Please someone help me.
I want to trigger a macro with my mouse in a Game.
When i press the Wheel Button Down it should fire T4T4T4...
However the code i have doesn't do anything:

Code: Select all

MButton::
While GetKeyState("MButton")
{
Send, 4
sleep, 290
Send, t
sleep, 200
}
return
If i let the "While GetKeyState" away, it works but it only fires 1 time instead of a continious stream.
I want it to do T4T4T4T4 as long as i hold the Wheel down.

I have a similar code bound to a keyboard key and that works fine:

Code: Select all

^::
While GetKeyState("^")
{
Send, t
sleep, 1
Send, f
Sleep, 1
Send, 4
sleep, 1
}
return
Thank you very much for any advice!

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ccqcl, Xtra and 216 guests