Hi Guys,
So I've been trying to learn to write AHK scripts for a while now, and am still struggling. What i'm after is a script for Siege, which would function as an auto-lean when I ADS.
So basically when I press a modifier plus RButton (LAlt+RButton), It would trigger the effect of repeatedly pressing 'q' 'e' 'q' 'e' 'q' 'e' with a 250ms or so delay in between whilst ever (LAlt+RButton) is held down, and when I release (LAlt+RButton) it would drop me out of ADS and stop leaning left and right. The reason for the modifier is so that I can aim normally without the leaning if needed.
If anyone could help me with this and possibly comment out their code so that I can understand and learn it, it would be greatly appreciated.
And if anything i've said doesn't make sense please feel free to ask the question.
Thanks in advance,
Rainbow Six Siege Leaning AHK
-
- Posts: 10
- Joined: 20 Dec 2017, 17:57
- ahkDustVorteX
- Posts: 47
- Joined: 14 May 2014, 12:08
Re: Rainbow Six Siege Leaning AHK
Hi DoobieToTheHead,
Something like this? I did not tested, but i guess is some sort of this:
Regards
Something like this? I did not tested, but i guess is some sort of this:
Code: Select all
{LAlt}{RButtonDown}::
{
i := 1
While (i<100)
{
Send, q
Sleep, 250
Send, e
i := i + 1
}
Return
}
Editor: Notepad++
"Those who wait and persist, always achieve."
"Those who wait and persist, always achieve."
-
- Posts: 10
- Joined: 20 Dec 2017, 17:57
Re: Rainbow Six Siege Leaning AHK
ahkDustVorteX wrote:Hi DoobieToTheHead,
Something like this? I did not tested, but i guess is some sort of this:
RegardsCode: Select all
{LAlt}{RButtonDown}:: { i := 1 While (i<100) { Send, q Sleep, 250 Send, e i := i + 1 } Return }
Invalid code i'm afraid, error on start...
-
- Posts: 10
- Joined: 20 Dec 2017, 17:57
Re: Rainbow Six Siege Leaning AHK
#Persistent
#SingleInstance, Force
;
;
RButton::
while (GetKeyState("RButton", "P")) {
Loop{
Send, q
Sleep, 250
Send, e
Sleep, 250
}}
Pause
This is what I have so far, it's working, all im unsure on is how to get it to stop on key release.... and how to make it a alt plus rbutton? instead of just rbutton?
#SingleInstance, Force
;
;
RButton::
while (GetKeyState("RButton", "P")) {
Loop{
Send, q
Sleep, 250
Send, e
Sleep, 250
}}
Pause
This is what I have so far, it's working, all im unsure on is how to get it to stop on key release.... and how to make it a alt plus rbutton? instead of just rbutton?
- ahkDustVorteX
- Posts: 47
- Joined: 14 May 2014, 12:08
Re: Rainbow Six Siege Leaning AHK
You have to use RButtonDown event. When you click and hold, the code begins. If you release the button, it stops.
Editor: Notepad++
"Those who wait and persist, always achieve."
"Those who wait and persist, always achieve."
-
- Posts: 10
- Joined: 20 Dec 2017, 17:57
Re: Rainbow Six Siege Leaning AHK
How do I incorporate that? I have tried RButtonDown:: but this is incorrect :\ahkDustVorteX wrote:You have to use RButtonDown event. When you click and hold, the code begins. If you release the button, it stops.
-
- Posts: 10
- Joined: 20 Dec 2017, 17:57
Re: Rainbow Six Siege Leaning AHK
Right I think I've done it, the only thing I could do with now is a hotkey to close the script, although anything I do seems to break the script :\
Code: Select all
#Persistent
#SingleInstance, Force
;
;
$!RButton::
while (GetKeyState("RButton", "P"))
{
Loop,{
Send, q
Sleep, 250
GetKeyState, RButton, P
if state = U ; The key has been released, so break out of the loop.
Reload
Send, e
Sleep, 250
GetKeyState, state, RButton, P
if state = U
Reload
}}
Who is online
Users browsing this forum: No registered users and 144 guests