<< Click to Display Table of Contents >> Navigation: 3. Script Language > Keyboard Typing Simulation > Keyboard Typing Simulation |
MiniRobotLanguage (MRL)
SDA./SDU. Command
Send Keypresses using a different method that is between Direct and Compatible Engine.
Intention
Technically SDA. / SDU. places the characters directly the keyboard buffer.So they do the same.
. The only difference is that SDU. contains Optimizations for sending UNICODE-Text. It may only make sense in Applications who can receive such special Text.
This SendInput Technology is faster then other Compatible Engine Typing Commands.
But its slower then the Direct-Engine Commands. So its some where in between.
Use it if you can use it for your usage.
The SDA. and the SDU.-Command
STW.ct|WordPadClass|Dokument - WordPad
'SWP.2605,585|539,283|T
SCW.nc|1|RICHEDIT50W|{&NOTEXT:}
' This is our Text
$$TXT=Hallo Welt{ENTER}
' We look at the Hexdump
PRT.$$TXT|h
' Now we make it UNICODE
ATU.$$TXT
' We look at the Hexdump
PRT.$$TXT|h
' Click into Wordpad
MLM.w|423,139
' Do the typing
SDU.$$TXT
SDA.$$TXT
MBX.Look
ENR.
Then Windows will send the characters to the application that currently has the Input-focus.
Apart from normal Ascii characters, SDA. / SDU. can also handle some special characters that are unique just for these commands:
'
' These special Tokens are currently implemented:
{CTRL_D} + {CTRL_U}
{ALT_D} + {ALT_U}
{SHIFT_D} +{SHIFT_U}
{WIN_D} + {WIN_U}
{CTRL}
{ALT}
{SHIFT}
{WIN}
{BACKSPACE},{ENTER},{INSERT},{DELETE}
{RIGHT},{LEFT},{UP},{DOWN}
{HOME}, {END}
{TAB}, {ESCAPE}
{PGUP},{PGDN}
{F1}, {F2}, {F3}, {F4}, {F5}, {F6}, {F7}, {F8}, {F9}, {F10}, {F11}, {F12}
{APPS}
{NUMLOCK}
' The {.._D} are the 'key down' codes.
' The {.._U} are the 'key up' codes.
'
'Examples of use:
'SDA.This is a TEST
'SDU.12{BACKSPACE}{BACKSPACE}abcdef{ENTER}
'SDA.{CTRL_D}ac{CTRL_U}" simulates a CTRL-a CTRL-c key combination. In most applications this copies the selected data.
'SDU.{CTRL}a{CTRL}c" simulates a CTRL-a CTRL-c key combination. In most applications this copies all Text.
' You can use Variables:
' SDA.$$TXT
These commands have their own specific Special Characters. And They work with an own internal System, therefore an intermixing with other such commands may not be a good idea.
You can read more about Keyboard-Simulation and Text-Boxes in the chapter:
Syntax
SDA.P1
SDU.P1
Parameter Explanation
P1 - VAR or STRING with xharacters and Special Tokens, see above.
Example
' Type into Ultraedit
STW.Act|Afx:|UltraEdit-32
SCW.c|EditControl
SAW.
VAR.$$TXA=Hallo Welt{ENTER}
SDA.$$TXA{ENTER}
END.
Remarks
-
Limitations:
-
See also:
• 1.9.1.6 Edit-Textbox Control
• RST. - Replace Selected Text