이곳이 물어볼 수 있는 곳이길 바랍니다. 탭하면 LButton이 정상적으로 실행되기를 원하지만 누르고 있으면 RButton을 누르기를 원합니다. 예: LButton에 스팸을 보내 가벼운 공격을 했지만 LBUtton을 1초 동안 누르고 있으면 RBUtton(강한 공격)이 실행됩니다. 포럼을 검색했지만 보류에 관한 대부분의 요청이 내 의도와 맞지 않습니다.
감사합니다!! (죄송하지만 피팅 태그를 찾기 위해 168페이지 전체를 검색할 수 없었습니다)
답변1
당신이 무엇을 쫓고 있는지 100% 확신할 수는 없습니다. 이와 같은 것은 어떻습니까?...
#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