script help
-
- Posts: 6
- Joined: 29 Apr 2024, 17:43
script help
hi i am new to AHK, im trying to make a code that when the key "z" is held, it will spam the key "f" with 50ms intervals, indefinetly until the key "z" is released. help is much appreciated
Last edited by joedf on 29 Apr 2024, 18:10, edited 1 time in total.
Reason: Moved to "Ask For Help"
Reason: Moved to "Ask For Help"
Re: script help
Welcome to this AutoHotkey forum!
Code: Select all
#Requires AutoHotkey v2.0
z:: {
SetKeyDelay 50
While GetKeyState(ThisHotkey, "P")
SendEvent 'f'
}
-
- Posts: 6
- Joined: 29 Apr 2024, 17:43
Re: script help
hi, sorry i realised i needed shift and z, i found out the + sign means r but then i did +z but then it compiled, but displayed an error when opening the file
-
- Posts: 6
- Joined: 29 Apr 2024, 17:43
Re: script help
NVM I FOUND OUT HOW TO FIX IT
[Mod edit: Added [code][/code] tags. Please use them yourself when posting code!]
Code: Select all
LShift & r:: {
SetKeyDelay 50
While GetKeyState("r", "P") && GetKeyState("Lshift", "P")
SendEvent 'f'
}
Who is online
Users browsing this forum: No registered users and 33 guests