When third-party applications are automated the emulation of key pressing is often used to fill in the entry fields with necessary values. Meanwhile, sometimes it is important that the keys CapsLock, NumLock and ScrollLock should be in a definite status: On or Off. Otherwise, the entry fields of a dialog can be filled in with incorrect values.
Now we will look at the ways to put these keys in a definite status.
To identify the status of Lock keys there are system variables in RoboTask:
- {CapsLockState}
- {NumLockState}
- {ScrollLockState}
You can find these variables in the group of variables "Keyboard".


For example, to switch off CapsLock, the algorithm suggests itself:
- Examine the status of a key.
- If it is on, press CapsLock.
Look how it works in the prepared example.
Save the text of the task in a file and use the menu Task -> Import to import the task in the RoboTask.