Going crazy with AHK lol

Ask gaming related questions (AHK v1.1 and older)
yoka
Posts: 2
Joined: 22 Oct 2020, 10:14

Going crazy with AHK lol

Post by yoka » 22 Oct 2020, 10:57

hello guys,
is there an artist to help me out please.... i spent hours reading and experimenting but its just too advanced for me i guess...
let me explain..

i did this so every time i press mbutton the y gets pressed with a human delay lets say...

Code: Select all

MButton::y
 While GetKeyState("y","p"){
  Send y
  Sleep 50
 }
return
[Mod edit: [code][/code] tags added.]

i did this so every time i press WheelUp the x gets pressed three times.. maybe i should ad a human delay.
WheelUp::Send {x 3}

and now the tricky parts.... im trying to WheelDown but keep the enter key pressed as long as i WheelDown and then let go.. does not seem to work

Code: Select all

WheelDown::
Send {Enter down}
Sleep 3000
Send {Enter up}
return
this is ok...

Code: Select all

LButton::a
RButton::b
but when i press ..LButton and or RButton together with the XButton1 and or XButton2.. they seem to nullify each other... (XButton1 activates but desactivates LButton etc)...

Code: Select all

XButton1::Send z
XButton2::Send -
i would like to press them all 4 together (Lb, RB, XB1, XB2) and perform the desired action... (just like when i press LButton and RButton together... and it works..
hope someone can spare 5 mins.. its gonna be a long three months quarantine otherwise... thats all i want for xmas...
thx in forward

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

Re: Going crazy with AHK lol

Post by Rohwedder » 22 Oct 2020, 12:21

Hallo,
try:

Code: Select all

MButton::y
While GetKeyState("y","p"){
SoundBeep
Sleep 50
}
return
the While loop will never be executed!
Keeps Enter down as long as you make Wheeldowns at least one per second:

Code: Select all

WheelDown::
SetTimer, TEnter, -1000
IF !GetKeyState("Enter")
	Send {Enter down}
Return
TEnter:
Send {Enter up}
Return
I can't test the XButtons thing (I don't have any) but that will depend on your drivers how many keys and buttons are recognized as pressed at the same time.

yoka
Posts: 2
Joined: 22 Oct 2020, 10:14

Re: Going crazy with AHK lol

Post by yoka » 22 Oct 2020, 13:41

thx for your positive response Rohwedder,
much progress for sure..... you are a genius...
i think for pressing all keys together is the * function..
*LButton::a
*RButton::b
*XButton1::z
*XButton2::-
thx once more

Post Reply

Return to “Gaming Help (v1)”