On left click press A and D

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
havox
Posts: 2
Joined: 23 Jun 2018, 15:52

On left click press A and D

23 Jun 2018, 16:11

just looking for a simple code that does this....

i Click left mouse, presses A for 1.5 seconds then D for 1.5 seconds. and repeats on click.. thanks...
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: On left click press A and D

23 Jun 2018, 16:50

Code: Select all

LButton::
Send {a down}
sleep, 1500
Send {a up}
Send {d down}
sleep, 1500
Send {d up}
return

^esc::ExitApp
havox
Posts: 2
Joined: 23 Jun 2018, 15:52

Re: On left click press A and D

25 Jun 2018, 17:00

AHKStudent wrote:

Code: Select all

LButton::
Send {a down}
sleep, 1500
Send {a up}
Send {d down}
sleep, 1500
Send {d up}
return

^esc::ExitApp
Can i get some help on this one?? i am trying to complete my code, but when i press A, or D i want to be able to pause the script
but when that button is released the script turns right back on.

Code: Select all

~RButton::Strafe()
F7::_strafe := ! _strafe
F6::suspend

Strafe()
{
global _Strafe
if _Strafe
{
Loop
{
if GetKeyState("RButton", "P"){
Send, {RButton Down} 
Send {O down}
sleep, 500
Send {O up}
Send {L down}
sleep, 500
Send {L up}
Send, {RButton Up}  
}
else
break
} ;; loop
} ;; if
} ;; Strafe()


Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, doodles333, Google [Bot] and 380 guests