Code: Select all
~RButton & ~LButton::
Send, {RAlt 2}
While GetKeyState("RButton") && GetKeyState("LButton")
Continue
Return
Code: Select all
~RButton & ~LButton::
Send, {RAlt 2}
While GetKeyState("RButton") && GetKeyState("LButton")
Continue
Return
Code: Select all
a::a
a & b::
KeyWait, a, T.3
Send % ErrorLevel & GetKeyState("b", "P") ? "long" : "short"
KeyWait, a
KeyWait, b
Return
Hmm, ok, let me know if I am going the right way? PS I really don't know what I am doing XDmikeyww wrote: ↑17 Jan 2022, 10:32Here is an example that you can test in Notepad, and then make changes to match your needs.
Code: Select all
a::a a & b:: KeyWait, a, T.3 Send % ErrorLevel & GetKeyState("b", "P") ? "long" : "short" KeyWait, a KeyWait, b Return
Code: Select all
RButton::a
LButton::b
~a & ~b::
KeyWait, a, T.3
Send % ErrorLevel & GetKeyState("b", "P") ? "long" : "short"
KeyWait, a
KeyWait, b
Return
Code: Select all
Send, {RAlt 2}
While GetKeyState("RButton") && GetKeyState("LButton")
Code: Select all
RButton::RButton
RButton & LButton::
KeyWait, LButton, T.4
Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : ""
Return
There is no delay. It works the same as the old one. I tried to set higher T but still no delaymikeyww wrote: ↑17 Jan 2022, 12:07Below is an idea to test. Check KeyHistory as needed.
Code: Select all
RButton::RButton RButton & LButton:: KeyWait, LButton, T.4 Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : "" Return
keyHistory.png
Code: Select all
RButton::RButton
~RButton & LButton::
KeyWait, LButton, T.4
Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : ""
Return
Code: Select all
~RButton & ~LButton::
KeyWait, LButton, T.2
Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : ""
Return
Trigger works but now LButton don't work while holding RButton. We are getting really close XDmikeyww wrote: ↑17 Jan 2022, 13:22Try with the tilde.
Code: Select all
RButton::RButton ~RButton & LButton:: KeyWait, LButton, T.4 Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : "" Return
Code: Select all
RButton::RButton
~RButton & ~LButton::
KeyWait, LButton, T.4
Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : ""
Return
Code: Select all
#If WinActive("ahk_exe your_game.exe") ;; your game exe here so the script works only in game
M:: ;; key to stop the script on hold
Suspend, On
Pause, On
Return
M UP:: ;; key to continue the script
Suspend, Off
Pause, Off
Return
RButton::RButton ;; auto ping enemy while holding Rmouse+Lmouse (cooldown for 2-3s after ping)
~RButton & ~LButton::
KeyWait, LButton, T.1 ;; change to a cooldown of 2-3s after {RAlt 2} was clicked
Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : ""
Return
;; a place for one more script slide/cancel.
;; while hold C slide, let go will cancel slide
#If
Code: Select all
RButton::RButton
~RButton & ~LButton::
KeyWait, LButton, T.1 ;; no time delay
Send % ErrorLevel & GetKeyState("RButton", "P") ? "{RAlt 2}" : "" ;; this line should go on to 2-3 seconds cooldown after trigger
Return
Code: Select all
F3::F3
~F3 & ~F4:: ;; auto ping enemy while holding Rmouse+Lmouse (cooldown for 2-3s after ping)
Hotkey, % hk := A_ThisHotkey, Off
Send {RAlt 2}
SetTimer, Resume, -2000
SoundBeep, 1000
Return
Resume:
Hotkey, %hk%, On
SoundBeep, 1500
Return