How to assign a key to activate a part of my script

Ask gaming related questions (AHK v1.1 and older)
Repenting Sinner
Posts: 2
Joined: 06 Aug 2017, 10:18

How to assign a key to activate a part of my script

10 Aug 2017, 13:44

I want to make it so that when I press NumpadEnd, it switches to the first script that moves the mouse down when LMB is pressed, then when I press NumpadDown, I want it to switch it to the other script where it moves the mouse downwards when LMB is pressed.

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%

; SS
O::Suspend

; Weapon 1
~NumpadEnd::
if GetKeyState("LButton")
{
DllCall("mouse_event", uint, 1, int, 0, int, 3, uint, 0, int, 0)
Sleep, 50
}
return

; Weapon 2 Kriss Vector
~NumpadDown::
if GetKeyState("LButton")
{
DllCall("mouse_event", uint, 1, int, 0, int, 1, uint, 0, int, 0)
Sleep, 50
}
return

; Grenade
~MButton::
if GetKeyState("LButton")
{
Sleep, 3000
MouseClick, Left,,,,, U
}
return

Insert::ExitApp

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 62 guests