I'm trying to send a space down command and write an option on a ini file and use it to detect is the space down is still active. My code is like this:
Code: Select all
numpad0::
state1 := "%A_ScriptDir%\states.ini"
IniRead, nstate, %state1%, Teclas, cero
if %nstate% = 0
{
IniWrite, 1, %state1%, Teclas, cero
SendInput, {space down}
return
}
else
{
IniWrite, 0, %state1%, Teclas, cero
SendInput, {space up}
return
}
Anyone know how to fix that and make it work? I spend some days trying to figure out why is failing.
Thanks.