Clueless and need little help

Ask gaming related questions (AHK v1.1 and older)
pssgamer
Posts: 12
Joined: 28 Jan 2022, 01:35

Clueless and need little help

Post by pssgamer » 28 Jan 2022, 01:46

So I need a script in which if a press a set button, It series of button presses for a game (DS2).

Basically what i want my script to do is :-

if I press K, it stimulates the presses of [W+LShift+LeftMouseButton]*2 (doubleclick the three buttons)

Similarly

if I press L, it stimulates the presses of [W+LShift+RightMouseButton]*2 (doubleclick the three buttons)

[When the button is pressed it should also disable any input taken from the three keys (400 ms - 500 ms) until the command is executed so as to not mess with the move or prevent double executions]

The script should always be running waiting for the input of K or L t execute the commands respectively.

It might be a very simple script or complicated but with my current knowledge I am only able to bind one key press to stimulate another button (for ex - I stimulates RMouseButton) I am learning

Thanks

Rohwedder
Posts: 7614
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Clueless and need little help

Post by Rohwedder » 28 Jan 2022, 03:38

Hallo,
try:

Code: Select all

*k::
*l::
Button := ("*k"=A_ThisHotkey)?"LButton":"RButton"
Loop, Parse,% Block:="*$LShift,*$w,*$" Button, CSV
	Hotkey,% A_LoopField, Return, On
Loop, 2
{
	SendInput, {LShift Down}{w Down}{%Button% Down}
	Sleep, 50
	SendInput, {Blind}{LShift Up}{w Up}{%Button% Up}
	Sleep, 50
}
KeyWait, k
KeyWait, l
Loop, Parse,% Block, CSV
	Hotkey,% A_LoopField,, Off
Return:
Return

pssgamer
Posts: 12
Joined: 28 Jan 2022, 01:35

Re: Clueless and need little help

Post by pssgamer » 28 Jan 2022, 21:48

It just stimulates W. Maybe replace [W+LShift+LeftMouseButton] and [W+LShift+RightMouseButton] to [W+M] and [W+V]. i have rebinded my controls and made half the script.

The button G will stimulate [W+M] once
The button H will stimulate [W+V] once
That's it

Also that control disable thing punishes me for my mistiming so remove that.

And again,
Really Thanks

Post Reply

Return to “Gaming Help (v1)”