Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
- #Warn ; Enable warnings to assist with detecting common errors.
- SendMode InputThenPlay ; Recommended for new scripts due to its superior speed and reliability.
- lastSpaceTick := A_TickCount
- lastReleaseTick := A_TickCount
- #IfWinActive ahk_class SDL_app
- $*LButton::
- if !GetKeyState("Shift", "P") {
- sinceLastSpace := A_TickCount - lastSpaceTick
- sinceLastRelease := A_TickCount - lastReleaseTick
- if (sinceLastSpace > 400 or sinceLastRelease < 200) {
- Send {Space Down}
- Sleep, 15
- Send {Space Up}
- lastSpaceTick := A_TickCount
- }
- }
- Send {LButton Down}
- Sleep, 15
- if GetKeyState("LButton") and !GetKeyState("Shift", "P") {
- Send {LButton Up}
- lastReleaseTick := A_TickCount
- }
- return
- ~*LButton Up::
- lastReleaseTick := A_TickCount
- return
- ~*Space::
- lastSpaceTick := A_TickCount
- return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement