<< Click to Display Table of Contents >> Navigation: 3. Script Language > Keyboard Typing Simulation > Keyboard Typing Simulation |
MiniRobotLanguage (MRL)
IEK. Conditional Statement
If Extended Key-State
Intention
The IEK.-Command has two modes of operation.
In Mode 1, it can be used to react on the state of NUMLOCK, CAPSLOCK and SCROLLLOCK. What you get is really the "state of the keyboard". Not "the state of the button". IEK.-returns the "real thing", not just the key-states that you will get with IKS.
The keystates from IES. just show you, if actually the NUMLOCK-Key is up or down. IEK. will really get the state of the keyboard about NUMLOCK, CAPSLOCK, SCROLLLOCK etc. When choosing between IKS. and IEK. you need to understand the difference between these commands.
In Mode 2, it can be used to react on the state of the SHIFT, CTRL or the ALT-Key and others, see list below. In this case you really check whether the given Key is down or not.
Note: If CAPSLOCK is activated and if you check for SHIFT, then IEK. will evaluate "false", because that key is actually not down itself.
NEK. is the negative form of the command.
You can read more about Keyboard-Simulation and Text-Boxes in the chapter:
Syntax
IEK.P1 … ELS. … EIF.
Parameter Explanation
P1 - VAR or numeric
Parameter-List for P1:
SHIFT - any shift key (keyboard Shift-state)
LSHIFT - only left Shift-Key
RSHIFT - only right Shift-Key
STRG,CTRL - any Ctrl key (keyboard Ctrl-state)
LSTRG,LCTRL - only left Ctrl-Key
RSTRG,RCTRL - only right Ctrl-Key
MENU,ALT - any ALT key (keyboard ALT-state)
LMENU,LALT - only left ALT-Key
RMENU,RALT - only right ALT-Key
NUMLOCK,NUM - keyboard NUMLOCK-State
CAPSLOCK,CAPS - keyboard CAPSLOCK-State
SCROLLOCK,SCROL,SCROLL - keyboard SCROLLLOCK-State
Example
'*****************************************************
' EXAMPLE 1: IEK.
'*****************************************************
' Please run this script only in the editor
' Then press the SHIFT-Key (left or right) while its running.
DOL.1
IEK.SHIFT
DBP.SHIFT is pressed!
EIF.
OOP.
'*****************************************************
' EXAMPLE 2: NEK.
'*****************************************************
' Please run this script only in the editor
' Then press the NUMLOCK-Key (left or right) while its running.
DOL.1
NEK.NUM
DBP.NUMLOCK is NOT pressed!
EIF.
OOP.
'*****************************************************
' EXAMPLE 3: IEK.
'*****************************************************
' Please run this script only in the editor
' Then press the SHIFT-Key (left or right) while its running.
DOL.1
IEK.CAPSLOCK
DBP.CAPSLOCK is down!
EIF.
OOP.
Remarks
-
Limitations:
-
See also:
• 1.9.1.6 Edit-Textbox Control
• RST. - Replace Selected Text