3 lines
807 B
Plaintext
3 lines
807 B
Plaintext
|
REM A nested IF statement is quite simply an IF statement placed inside another IF statement. Nested IF statements may be used when evaluating a combination of conditions.
REM Example nested IF statements
IF ( $_CAPSLOCK_ON == TRUE ) THEN
IF ( $_NUMLOCK_ON == TRUE ) THEN
STRING Both Capslock and Numlock are on!
END_IF
END_IF
REM The condition of the first IF statement is evaluated — whether or not the target has reported that the caps lock key is on. If it is TRUE, then the nested IF statement will run.
|
|||
|
REM The second IF statement is evaluated much like the first, only this time checking the status of the num lock key.
|
|||
|
REM If both the capslock and numlock keys have been reported by the target as being on, then the string "Both Capslock and Numlock are on!" will be typed.
|