*****************************
**                         **
**         SCRIPTS         **
**                         **
*****************************


Scripts are a new and powerful feature of TrayClip. You can use them to make TrayClip do almost anything you want. With Scripts, TrayClip can automatically send any combination of keys to any application as if they were entered via the keyboard. This way TrayClip can automize many tasks you had to do by hand until now.



INTRODUCTION
************
A Script always begins with the letters "{SCRIPT}". A Script does nothing more than to send the keys that follow these letters to the application that was active before you executed the Script. If you want to type the text "Hello, World!" in Word and use Script to do so, you'd generate a script that simply looks like this: "{SCRIPT}Hello, World!" Then you would start Word, then you'd execute your Script. TrayClip minimizes itself and enters "Hello, World!" into Word. It works! However, there are a few characters that have a special meaning for Script, which you can't just type in if you want Script to type them.



SPECIAL CONTROL KEYS
********************
Some characters have a special meaning using Script. To use these not as special Script control characters, but as normal characters, you have to put them in these brackets {}. The characters are:

+	->	{+}
%	->	{%}
^	->	{^}
~	->	{~}
(	->	{(}
)	->	{)}
[	->	{[}
]	->	{]}
{	->	{{}
}	->	{}}

So, if you want Script to write "Apples + Oranges" then you have to make a Script like this: "{SCRIPT}Apples {+} Oranges"



IMPORTANT SYSTEM KEYS
*********************
It is fine that Script can write text, but with this ability alone, there's no advantage over the normal Pad List. What makes it so cool is the possibility to send system keys to other applications. For instance, the tab key is often used to jump from field to field, the return key often submits a form, ALT+F4 often closes an application...
The most important keys are listed here, the rest is listed at the end of the file.

Tab		{TAB}
Return		{ENTER}
Backspace	{BACKSPACE}, {BS} or {BKSP}
Del		{DELETE} or {DEL}
Esc		{ESC}
Shift and "h"	+h
Alt and "i"	%i
Ctrl and "j"	^j

So, if you want Script to write "Apples" in one field, then press the tab key (which usually jumps to the next field), write "Oranges" in the next field and then press the return key, your Script has to look like this: "{SCRIPT}Apples{TAB}Oranges{ENTER}"
If the form has to be submitted with Alt+F10 instead of the return key, you modify the Script to: "{SCRIPT}Apples{TAB}Oranges%{F10}"



USING ALT/SHIFT/CTRL FOR SEVERAL KEYS
**************************************
If you want TrayClip to "hold down" ALT while typing "Apples and Oranges", you could enter "{SCRIPT}%A%p%p%l%e%s %a%n%d %O%r%a%n%g%e%s". But it is much more elegant to use the round brackets ().
Here's how you do it: "{SCRIPT}%(Apples and Oranges)"
Of course it also works with CTRL and SHIFT: "{SCRIPT}^+(Apples and Oranges)"



TYPING A CHARACTER MORE THAN ONCE
*********************************
Perhaps you want to type a certain character 1000 times, maybe even more. Script enables you to do so without having to type it yourself. The syntax is simple, if you want to type NUMBER times KEY, just use {KEY NUMBER} in the Script. Here are a few examples:

28 x "h"	{h 28}
99 x F1		{F1 99}
17 x Alt+F6	%{F6 17}

Note that you write all codes WITHOUT a second pair of brackets. If you want to Write "Apples" in the first field, then jump over ten fields and write "Oranges" in the eleventh field, your Script looks like this: "{SCRIPT}Apples{TAB 10}Oranges"



OTHER SYSTEM KEYS YOU'LL NEVER NEED
***********************************
Up		{UP}
Down		{DOWN}
Left		{LEFT}
Right		{RIGHT}
Page Up		{PGUP}
Page Down	{PGDN}
Home		{HOME}
End		{END}

F1		{F1}
F2		{F2}
F3		{F3}
F4		{F4}
F5		{F5}
F6		{F6}
F7		{F7}
F8		{F8}
F9		{F9}
F10		{F10}
F11		{F11}
F12		{F12}
F13		{F13}
F14		{F14}
F15		{F15}
F16		{F16}

Num Lock	{NUMLOCK}
Scroll Lock	{SCROLLLOCK}
Caps Lock	{CAPSLOCK}
Break		{BREAK}
Ins		{INSERT} or {INS}



OTHER INFORMATION
*****************
Scripts are based on the SendKeys function of Microsoft VB. If you have got any questions or suggestions concerning the Script system, please contact us via Email (support@chtsoft.com)!
CHTsoft is not responsible for any damages done by executing Scripts.