Special Keys
|
Top Previous Next |
You can also send some special parameters called macros. There is also limited ability to send mouse clicks.
Delaying Keypresses If you would like System Scheduler to wait before sending keypresses to an application use the {WAIT=????} command, where ???? is the time to wait in milliseconds before starting to send keypresses ({WAIT=1000} is equivalent to 1 Second). {WAIT} will delay the start, this is useful if your application takes a few seconds to launch before it is ready to accept keys from System Scheduler, {WAIT} can also be used anywhere during the sequence of keypresses. If you would like to increase the interval between each individual keypress sent to the application use the {DELAY=????} command.
Key Combinations To specify keys combined with any combination of Alt, Ctrl, Shift and Win keys, precede the regular key code with one or more of the following codes:
For example, if you wanted to send the key combination to pop-up the Windows Find dialog (Windows Key+F) you would enter #F in the SendKeys line. Other examples:
CTRL+A = ^a (select all) CTRL+C = ^c (copy) CTRL+V = ^v (paste) ALT+F = %f (File menu) ALT+F4 = %{F4} (close window)
When using key combinations with ALT, CTRL or WIN you must use the modifiers %,^ or # and not the key tokens {ALT}, {CTRL} or {WIN}. Key tokens are used for individual keypresses. For example, to get the Start Menu to appear you can enter {WIN} in the SendKeys line.
There are times when you may want to actually send the characters #,+,^,%,{,} or ~ and you don't want them to behave as special modifiers. To do this just enclose the key you want to send in curly braces {}, for example, if you need to send the % character you could do something like this on the SendKeys line: echo {%}path{%} - this would appear as: echo %path%
Sending Multiple Modifiers Sometimes you may need to press the CTRL or ALT or WIN key, then a sequence of keys (rather than a single keypress), or you may need to press a combination of CTRL and ALT etc. You can do this with these special commands:
{CTRL_DOWN} {CTRL_UP} {ALT_DOWN} {ALT_UP} {WIN_DOWN} {WIN_UP} {SHIFT_DOWN} {SHIFT_UP}
For example, if you needed CTRL+SHIFT+F you could use:
{CTRL_DOWN}{SHIFT_DOWN}F{SHIFT_UP}{CTRL_UP}
Or if you needed to press ALT then TAB 3 times you could use:
{ALT_DOWN}{TAB}{TAB}{TAB}{ALT_UP}
Important: Remember to include the _UP command for any _DOWN command or you could end up with a stuck key.
Sending Character Codes Below is a list of special key tokens that cover all the main special keys on standard keyboards such as F1 - F12, Arrow Keys and Numeric Keypad keys. However sometimes you may want to send special characters that do not appear on the keyboard but are available as part of the ASCII character set, usually you can get these characters to appear by press ALT + ASCII CODE on Numeric Keypad. System Scheduler can simulate these ASCII characters by using a special token {CODE=xxx} where xxx is the ASCII code that would be typed on the numeric keypad. For example {CODE=92} would produce a '\' when using a standard character set.
(Note: you cannot use {CODE=xxx} when sending to DOS - Command Prompt windows, see: Sending Keypresses To DOS (Command Prompt) Windows )
Special Key Tokens
Back to Introduction
|