Looking for improvements

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
ahk1337user
Posts: 1
Joined: 21 May 2016, 22:14

Looking for improvements

21 May 2016, 22:24

Hello, I want to improve my script.

As it functions now, it spams a certain key, in this case space.
I wan't to improve the speed it spams, what would be the most optimal way to do this?

This is the script:

Code: Select all

SetBatchLines -1
SleepDuration = 1
TimePeriod = 1
DllCall("Winmm\timeBeginPeriod", uint, TimePeriod)

*space::
setkeydelay -1,-1
Loop
{
GetKeyState,state,space,P
if state = U
break
Send {Space}
DllCall("Sleep", UInt, SleepDuration)
}
DllCall("Winmm\timeEndPeriod", UInt, TimePeriod)
Return
Thanks in advance :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: filipemb, Google [Bot], mikeyww and 354 guests