<< Click to Display Table of Contents >> Navigation: 3. Script Language > Keyboard Typing Simulation > Keyboard Typing Simulation |
MiniRobotLanguage (MRL)
SDK. Command
Send Keys with VB-Rules
Intention
The SDK.-Command can be used to simulate Keyboard typing. SDK. is like if you really type something into the keyboard. This makes it compatible with real typing.
It is not as compatible as it is SKI. or SKP. or KYU. and KYD.
Therefore it is faster. It is not as fast as SDT. its like in between SKI. and SDT.
SDK. will work on any place, where you can also enter text using the keyboard.It will work also in browsers, Java- and WEB-based controls.
As it is just like if "somebody is really typing", it has all advantages and all limitations from that.
SDK. has a different Syntax then the other Commands as its based on another System (VB-like Sendkeys).
• The target control must have Input focus
• the target window must be in front
• you may need to wait a bit (PAU.0.5) after typing until the control is ready
• SDK. its slower then any direct engine command
• but its highly compatible
• it understands special keyboard-actions like ctrl- or Shift or Alt-Key (see below).
• It can not change the text of buttons or controls like SDT.
SDK. emulates most of the same rules as the VisualBasic Sendkeys-Command.
VAR.$$TXA=abc$crlf$cba
SDK.$$TXA
You can send these codes Special-Codes:
Generally as a Prefix:
"+" is SHIFT
"^" is CTRL
"%" is ALT
Use "(" and ")" to GROUP Shifted Keys.
Like "+(ab)"
{ENTER}
{ESC}
{UP} {DOWN} {LEFT} {RIGHT}
{BACKSPACE} or {BS}
{HOME} {END}
{PGUP} {PGDN}
{TAB}
{DEL} or {DELETE}
{INS} or {INSERT}
{WIN}
{PRTSC}
{CAPSLOCK}
{NUMLOCK}
{SCROLLLOCK}
{HELP}
{PAUSEKEY}
{BREAK}
{LCONTROL} {RCONTROL}
{LSHIFT}{RSHIFT}
{ATTN}
{LMENU} {RMENU}
{F1}-{F16}
{NOTHING} ' so you can use Alt etc. without any Letter: %{NOTHING}
{SLEEP 1000} <-- 1000 miliseconds Pause
{PAUSE 3.5} <-- Pauses 3.5 seconds (while processing event messages)
{App WindowName} <-- switches to this window (does NOT support any wildcards, needs complete Window-Text!)
{LMOUSECLICK X Y} <-- Left button mouse click at x/y screen position
{RMOUSECLICK X Y} <-- Right button mouse click at x/y screen position
{MMOUSECLICK X Y} <-- Middle button mouse click at x/y screen position
{CHR 123} <-- Send an ascii code 123 (same as pressing Alt-123 example: {CHR 65} would be "A"
{AppActivate WindowName} will switch focus to the WindowName you specify
Procede characters with + for Shift, ^ for Ctrl, % for Alt example: ^p would be Ctrl-p
You can also group characters for shift/ctrl/alt with parentheses () example: %(fx) would be Alt-F Alt-X
To send these special characters {+^%~( as plain characters enclose them in braces example: {{} would just send {
To send a key multiple times inclose it in braces with a number like {h 3} example: {DEL 41} would send DELETE key 41 times
You can read more about Keyboard-Simulation and Text-Boxes in the chapter:
Syntax
SDK.P1
Parameter Explanation
P1 - VAR or STRING
Example
' Type into Ultraedit
STW.Act|Afx:|UltraEdit-32
SCW.c|EditControl
SAW.
VAR.$$TXA=abc$crlf$cba
SDK.$$TXA
END.
Remarks
-
Limitations:
-
See also:
• 1.9.1.6 Edit-Textbox Control
• RST. - Replace Selected Text