Code: Select all
Loop
{
GetKeyState, state, NumpadEnd
GetKeyState, state2, 1
if ( state = D
and state2 = D ) ; It is checked if the keys are pressed
loop ; If the keys are pressed, then it is checked whether they are released
{
if ( state = U )
and ( state2 = U ) ; Keys released
{ MsgBox, "Keys are pressed and released NumPadEnd и 1"
break }
}
GetKeyState, state, NumpadEnd
GetKeyState, state2, 2
if ( state = D )
and ( state2 = D ) ; It is checked if the keys are pressed
loop ; If the keys are pressed, then it is checked whether they are released
{
if ( state = U )
and ( state2 = U ) ; ; Keys released
{ MsgBox, "Keys are pressed and released NumPadEnd и 2"
break
}
}
}