script for r6s Topic is solved

Ask gaming related questions (AHK v1.1 and older)
ksey
Posts: 4
Joined: 18 Apr 2018, 04:44

script for r6s

18 Apr 2018, 05:03

Hello
I need your help for a script creation for r6s .
I would like to know if it is possible to lean automatically right or left, I explain what I want, when I aim and I move on the right (D key) it automatically leans to the right(key E for lean) and the same to the left key Q (key A for lean), if so how?
Thank you for the helps
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s

20 Apr 2018, 08:57

Hallo,
when the D key is pressed, E should also be pressed
and the same with Q and A?

Code: Select all

~d::e
~q::a
ksey
Posts: 4
Joined: 18 Apr 2018, 04:44

Re: script for r6s

20 Apr 2018, 12:27

Rohwedder wrote:Hallo,
when the D key is pressed, E should also be pressed
and the same with Q and A?

Code: Select all

~d::e
~q::a
hello thx for the help , I would like that when I stay the click right mouse
and I press the D key that the E key is activated to make "click right mouse + D = click right mouse + D + E "
and the same thing for
when I press the click right mouse to press the A key that the Q key is activated to make " click right mouse + A = click right mouse + A + Q"

sorry if it's not very well explain my english is not very good
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s

20 Apr 2018, 13:02

Hallo,
then this:
(RButton losts it's native function)

Code: Select all

RButton & ~d::e
RButton & ~a::q
or that:

Code: Select all

#If GetKeyState("RButton","P")
~d::e
~a::q
#If
ksey
Posts: 4
Joined: 18 Apr 2018, 04:44

Re: script for r6s

22 Apr 2018, 04:36

Rohwedder wrote:Hallo,
then this:
(RButton losts it's native function)

Code: Select all

RButton & ~d::e
RButton & ~a::q
or that:

Code: Select all

#If GetKeyState("RButton","P")
~d::e
~a::q
#If
Hello
nice work
thx for reply

on the other hand, how to make the command not repeat it? just once right mouse + D + E that it does it once the E, a specific command to add?
thx ;)
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s  Topic is solved

22 Apr 2018, 05:00

Hallo,
try this
(RButton losts it's native function):

Code: Select all

RButton & d::
	Send de
	KeyWait, d
Return
RButton & a::
	Send aq
	KeyWait, a
Return
or that:

Code: Select all

~RButton & d::
	Send de
	KeyWait, d
Return
~RButton & a::
	Send aq
	KeyWait, a
Return
ksey
Posts: 4
Joined: 18 Apr 2018, 04:44

Re: script for r6s

22 Apr 2018, 05:56

nice job perfect ;) thx for you help ;)
chees

Re: script for r6s

25 Apr 2018, 03:54

can u do please the same thing for logitech script?
odin42ru
Posts: 6
Joined: 05 Apr 2022, 20:07

Re: script for r6s

05 Apr 2022, 21:06

Rohwedder wrote:
22 Apr 2018, 05:00
Hallo,
try this
(RButton losts it's native function):

Code: Select all

RButton & d::
	Send de
	KeyWait, d
Return
RButton & a::
	Send aq
	KeyWait, a
Return
or that:

Code: Select all

~RButton & d::
	Send de
	KeyWait, d
Return
~RButton & a::
	Send aq
	KeyWait, a
Return
Help me finalize it. When you press many times In order to have pressed once. When you press A, Q was pressed once and you could continue to press A as much as you want. A=>QA.. A=>AA... D=>ED.. D=>DD... But after pressing D, you could press AQ, and after pressing A, you could press DE. Without looping. These are the slopes in the game on QE and it is necessary that they work once when you spam AD .
I searched a lot and couldn't find anything.

https://www.youtube.com/watch?v=5q02NYhtOIU
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s

06 Apr 2022, 02:52

Hallo,
unfortunately, the video did not help me. I understand spoken English too bad.
Does the fact that a second started KeyWait command pauses an already running one bother you?
Then perhaps?:

Code: Select all

; RButton losts it's native function
RButton & d::Send,% !KeyWaitD?("de",KeyWaitD := True):
~d Up::KeyWaitD := False
RButton & a::Send,% !KeyWaitA?("aq",KeyWaitA := True):
~a Up::KeyWaitA := False
odin42ru
Posts: 6
Joined: 05 Apr 2022, 20:07

Re: script for r6s

06 Apr 2022, 05:13

Rohwedder wrote:
06 Apr 2022, 02:52
Hallo,
unfortunately, the video did not help me. I understand spoken English too bad.
Does the fact that a second started KeyWait command pauses an already running one bother you?
Then perhaps?:

Code: Select all

; RButton losts it's native function
RButton & d::Send,% !KeyWaitD?("de",KeyWaitD := True):
~d Up::KeyWaitD := False
RButton & a::Send,% !KeyWaitA?("aq",KeyWaitA := True):
~a Up::KeyWaitA := False
This is what you need. You're doing great. But it needs to be finalized. The A and D buttons stop being pressed. I checked in a text editor.
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s

06 Apr 2022, 07:46

Then perhaps:

Code: Select all

; RButton losts it's native function
RButton & ~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~d Up::KeyWaitD := False
RButton & ~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~a Up::KeyWaitA := False
Or if both letters are to remain pressed in each case:

Code: Select all

; RButton losts it's native function
RButton & ~d::e
RButton & ~a::q
In a text editor, the keyboard driver does autorepeat. Run this as second script to display the logical state of the keys "d e a q":

Code: Select all

#Persistent
OnExit("KeysReset")
;KeyStateTimer shows the logical State of Keys
SetTimer,State,200,Keys:="d e a q"
State: ;Keys separated with space or tab
For all,Key in StrSplit(Keys,[A_Space,A_Tab])
	Text.=Trim(Key)>""?"`n" Key "`t" (GetKeyState(Key)?"down":"up"):
MouseGetPos, MX, MY ;separated from another ToolTip
ToolTip,% SubStr(Text,2),MX+16,MY+32,4,Text:=""
Return
KeysReset()
{
	Loop, 0xFF
		IF GetKeyState(Key:=Format("VK{:X}",A_Index))
			SendInput, {%Key% up}
	ExitApp
}
odin42ru
Posts: 6
Joined: 05 Apr 2022, 20:07

Re: script for r6s

06 Apr 2022, 22:15

Rohwedder wrote:
06 Apr 2022, 07:46
Then perhaps:

Code: Select all

; RButton losts it's native function
RButton & ~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~d Up::KeyWaitD := False
RButton & ~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~a Up::KeyWaitA := False
Or if both letters are to remain pressed in each case:

Code: Select all

; RButton losts it's native function
RButton & ~d::e
RButton & ~a::q
In a text editor, the keyboard driver does autorepeat. Run this as second script to display the logical state of the keys "d e a q":

Code: Select all

#Persistent
OnExit("KeysReset")
;KeyStateTimer shows the logical State of Keys
SetTimer,State,200,Keys:="d e a q"
State: ;Keys separated with space or tab
For all,Key in StrSplit(Keys,[A_Space,A_Tab])
	Text.=Trim(Key)>""?"`n" Key "`t" (GetKeyState(Key)?"down":"up"):
MouseGetPos, MX, MY ;separated from another ToolTip
ToolTip,% SubStr(Text,2),MX+16,MY+32,4,Text:=""
Return
KeysReset()
{
	Loop, 0xFF
		IF GetKeyState(Key:=Format("VK{:X}",A_Index))
			SendInput, {%Key% up}
	ExitApp
}
Im Allgemeinen habe ich es so gemacht:

Code: Select all

~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~a Up::KeyWaitD := False
~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~d Up::KeyWaitA := False
Everything works as it should. And in the text editor everything is pressed as it should be.
But in the game, the A and D buttons work well, and the slopes on Q and E work every other time. The script in the game slows down for some reason, or the Q and E buttons are pressed very quickly. The game does not work as it should. I tried to do something and nothing works.
Please help me.

In german:
Spoiler
Last edited by gregster on 07 Apr 2022, 03:12, edited 1 time in total.
Reason: Since this is an english language forum, I moved the english text from the spoiler to the front.
BoBo
Posts: 6564
Joined: 13 May 2014, 17:15

Re: script for r6s

06 Apr 2022, 23:36

@odin42ru - du solltest dir abgewöhnen komplette Sektionen zu quoten/zitieren (den “-Button) nur um den Ansprechpartner zu triggern. Das macht den thread unleserlich. Benutze stattdessen die "mention"-option (den "@"-button). Danke :thumbup:
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s

07 Apr 2022, 02:36

You have swapped KeyWaitA and KeyWaitD!
Try:

Code: Select all

~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~a Up::KeyWaitA := False
~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~d Up::KeyWaitD := False
odin42ru
Posts: 6
Joined: 05 Apr 2022, 20:07

Re: script for r6s

07 Apr 2022, 03:04

Rohwedder wrote:
07 Apr 2022, 02:36
You have swapped KeyWaitA and KeyWaitD!
Try:

Code: Select all

~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~a Up::KeyWaitA := False
~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~d Up::KeyWaitD := False
Your script is working. But it doesn't work in the game. Do you understand?
In the game, he does not press Q and E.
How to make it work in the game?
Maybe there is another option?

In german:
Spoiler
Last edited by gregster on 07 Apr 2022, 03:09, edited 1 time in total.
Reason: Since this is an english language forum, I moved the english text from the spoiler to the front.
Rohwedder
Posts: 7551
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: script for r6s

07 Apr 2022, 03:50

Perhaps your game wants a greater PressDuration?
Try:

Code: Select all

SetKeyDelay, 50, 100
~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~a Up::KeyWaitA := False
~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~d Up::KeyWaitD := False
odin42ru
Posts: 6
Joined: 05 Apr 2022, 20:07

Re: script for r6s

07 Apr 2022, 07:53

Rohwedder wrote:
07 Apr 2022, 03:50
Perhaps your game wants a greater PressDuration?
Try:

Code: Select all

SetKeyDelay, 50, 100
~d::Send,% !KeyWaitD?("e",KeyWaitD := True):
~a Up::KeyWaitA := False
~a::Send,% !KeyWaitA?("q",KeyWaitA := True):
~d Up::KeyWaitD := False
Thanks! You are the best)
That's what we need. Everything works.
It happens when you spam buttons A and D very quickly, then it starts to slow down the slopes on Q and E.
But come on... And so it will do) Thanks)
Spoiler
odin42ru
Posts: 6
Joined: 05 Apr 2022, 20:07

Re: script for r6s

07 Apr 2022, 22:11

I've redone the macro. Now it does not slow down, it works as it should.
Macro for Rainbow six, tilt Q and E on buttons A and D.
Use:

Code: Select all

#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
Process, Priority,, High
SetKeyDelay, -1, 100
~d::Send,% !KeyWaitD?("e",KeyWaitD := 1,KeyWaitA := 0):
~a::Send,% !KeyWaitA?("q",KeyWaitA := 1,KeyWaitD := 0):
`::Suspend
F8::reload
Spoiler

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: Google [Bot] and 54 guests