I want to fire the letter 8, which can be fired by Space or the 8 key. This i have covered.
The problem comes up in a second script, below. Where I am trying to use "C' as Capslock, for a modifier in my Lua Scipt. Logitech Lua allows for either alt, capslock, or shift to accomplish this so any of those will do.
When I engage "8", its fine on its own. But when I engage 8 + C together, capslock just spams. I assume the two sleep timers are being challenged.
I have tried learning SleepTimer, but it requires learning a separate set of syntax that I have yet to familiarize myself with. Thanks in advance. Sorry for my stupidity.
Capslock Code:
Code: Select all
#Persistent
$c::
SetCapsLockState On
sleep, 800
SetCapsLockState Off
return
~F2::Suspend
return
~Pause::
Suspend,Off
ExitApp
Second code that seems to be triggering the first one:
Code: Select all
#Persistent
$Space::
$8::
While GetKeyState("Space", "P") | GetKeyState("8", "P") {
Toggle := !Toggle
Send {8 down}
Sleep, 100
}
Send {8 up}
Return
~F2::Suspend
Return
~PgDn::
Suspend,Off
ExitApp