I triedIf you are using a weapon with a scope attached, you have an additional option when aiming: Click or spin the middle mouse wheel to zoom in through the scope.
Code: Select all
~RButton::
Sleep 500
MouseClick, WheelUp, , , 1
Then I did the trick in an awkward way by adapting an example code found in AHK help files into the following:
Code: Select all
#MaxThreadsPerHotkey 3
LWin:: ; LWin hotkey (change this hotkey to suit your preferences).
#MaxThreadsPerHotkey 1
if KeepLWinRunning ; This means an underlying thread is already running the loop below.
{
KeepLWinRunning := false ; Signal that thread's loop to stop.
return ; End this thread so that the one underneath will resume and see the change made by the line above.
}
; Otherwise:
KeepLWinRunning := true
Loop
{
; The next four lines are the action you want to repeat (update them to suit your preferences):
MouseClick, WheelUp, , , 1
Sleep, 500
; But leave the rest below unchanged.
if not KeepLWinRunning ; The user signaled the loop to stop by pressing LWin again.
break ; Break out of this loop.
}
KeepLWinRunning := false ; Reset in preparation for the next press of this hotkey.
return
Could you please help me on this?