0

I hope this is the right place to ask. I want the LButton to be executed normally if tapped but want RButton to be pressed when held down. Example: I spam LButton and do a light attack but holding LBUtton down for 1 second will Execute RBUtton (Heavy attack). I searched the forums but most requests concerning holding down dont fit my intent.

Thank you!! (Sorry but couldn't be bothered to search all 168 pages for a fitting tag)

  • 1
    you don't have to look at all tags in the list. Type some characters and it'll be suggested – phuclv Oct 10 '17 at 16:26
  • Not the question but not allowed to make a user tag since im not signed in – BFK Oct 10 '17 at 17:38
  • why do you need to create a tag? even normal users don't have that permission. and there's already autohotkey tag – phuclv Oct 11 '17 at 2:12
0

I'm not 100% sure what you're after, what about something like this?...

#SingleInstance, Force
#NoEnv
#NoTrayIcon
#Persistent 

; tilde allows LButton to click as normal vs. this routine capturing the click
; i.e., LButton will always click once prior to RButton click getting sent 1 sec later
~LButton::      
    StartTick:=A_TickCount
    While GetKeyState("LButton", "P") && ((A_TickCount-StartTick)<1000)      ; 1000ms hold-down requirement
        Sleep 10

    If GetKeyState("LButton", "P")  ; If LButton is still down after loop exits, send RButton
        SendInput, {RButton}
Return

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.