[Mod edit: Removed empty codebox.]
hi, im new to AHK and i have a question
what i basically want to do if if i tap left shift and r i want it to spam f, but left shift is my sprint button. essentially i want to be sprinting while tap r it toggles spamming f. but when the spam f is enabled it stops my sprint so i am unable to sprint when the code is active. is there any fix for this?
[Mod edit: Changed topic subject 'scripting to smth more descriptive.']
tap left shift and r to spam f
-
- Posts: 6
- Joined: 29 Apr 2024, 17:43
Re: tap left shift and r to spam f
Hallo,
perhaps?:or?:
perhaps?:
Code: Select all
<+r::f
Code: Select all
#HotIf GetKeyState("LShift","P")
r::f
#HotIf
-
- Posts: 6
- Joined: 29 Apr 2024, 17:43
Re: tap left shift and r to spam f
it would be something close to this, i figured out what id need to do
essentially, i want to click shift and r, the result of this would be left shift being held and f being spammed. but then after i press shift r again it would stop spamming f, (i think i would only need to press r bc the code is holding left shift technically, correct me if im wrong)
sorry for the complication lol i dont really know what im doing
essentially, i want to click shift and r, the result of this would be left shift being held and f being spammed. but then after i press shift r again it would stop spamming f, (i think i would only need to press r bc the code is holding left shift technically, correct me if im wrong)
sorry for the complication lol i dont really know what im doing
-
- Posts: 6
- Joined: 29 Apr 2024, 17:43
Re: tap left shift and r to spam f
Code: Select all
LShift & r:: {
SetKeyDelay 50
While GetKeyState("r", "P") && GetKeyState("Lshift", "P")
SendEvent 'shift down'
SendEvent 'f'
}
Re: tap left shift and r to spam f
Then try:
Code: Select all
#Requires AutoHotkey v2.0
<+r:: { ; LShift & r
SetKeyDelay 50
While GetKeyState("r", "P") && GetKeyState("Lshift", "P")
SendEvent "{Blind}f"
}
Who is online
Users browsing this forum: moltenchees and 10 guests