Code: Select all
global state := false
hotkey, CapsLock, toggleState
hotkey, ~*LButton, rep1
toggleState()
{
if (state)
state := false
else
state := true
}
repeat(key, act)
{
bState := getKeyState(%key%, "P")
while (state AND bState)
{
sendInput %act%
Sleep 10
bState := getKeyState(key, "P")
}
}
rep1:
repeat("LButton", "{Click}")
return
Edit: Thanks for the answer! I guess I just didn't quite understand parameters and how variables work with these types.