Program SendData is used to send data and keystrokes from an open text file
or Excel worksheet into active window of another application.
In particular, it may be useful to load data into database tables.
To send the data uses SendKeys method of WshShell object:
http://msdn.microsoft.com/en-us/library/8c6yea83%28v=VS.85%29.aspx In source file, we can distinguish two types of fields:
- fields that contain data,
- fields containing keystrokes and delays.
In the text file, fields should be separated by char: ";", "|" or TAB.
In the single file should be used one type of field separator.
In Excel worksheet, each field is placed in a separate cell.
Data fields can contain any string of characters, that will be sent to the
target window. If the first character of send string is backslash "\",
then such the string should be preceded by an additional backslash character.
So to send "\AbC", you should use "\\AbC".
Field with keystrokes and delays must begin with a single backslash "\".
In order to send special keys, you must use the symbols by the following
statement:
Ctrl : *CTRL
Shift : *SH
Alt : *ALT
Enter : *ENT
Esc : *ESC
Insert : *INS
Delete : *DEL
BackSpace : *BS
Tab : *TAB
Down arrow : *DN
Up arrow : *UP
Right arrow: *RT
Left arrow : *LT
Page Down : *PGDN
Page Up : *PGUP
End : *END
Home : *HOME
F1 : *F1
F2 : *F2
F3 : *F3
F4 : *F4
F5 : *F5
F6 : *F6
F7 : *F7
F8 : *F8
F9 : *F9
F10 : *F10
F11 : *F11
F12 : *F12
+ : *+
^ : *^
% : *%
~ : *~
( : *(
) : *)
[ : *[
] : *]
{ : *{
} : *}
Combination keys with Ctrl, Shift and Alt:
\*ALTaso
means pressing A while holding down the Alt key,
and then release the Alt key and pressing the sequence S and O.
\*ALT(aso)
means sequentially pressing the keys A, S, O while holding down the Alt key.
Should be use lowercase letters to identify the keystrokes that returns letter
character.
Delays:
*n
where n is the delay in milliseconds (an integer), eg:
\*2000 - stop sending data by 2 seconds.
In one field can be combined keystrokes and delays:
\*CTRL(vp)*500ALTw*100*F1*DN*TAB
Note:
Option "Save file", additionally saves parameters set in the program.
In the case of text file, the parameters are saved in NTFS file-stream
named "SendDataParameters". If the file system does not support NTFS streams,
the parameters are not saved.
In the case of Excel workbook, the parameters are saved as a comment in cell A1.
Keyboard shortcuts available in the dialog box of program:
Shift+Alt+Right, Left, Down, Up, End, Home, PgDn, PgUp, C - move dialog box,
Esc - close program.