home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Club Amiga de Montreal - CAM
/
CAM_CD_1.iso
/
files
/
274.lha
/
Scripit_v1.0
/
Docs
/
RawKey.DOC
< prev
next >
Wrap
Text File
|
1989-08-06
|
4KB
|
74 lines
Sending Text to a program
=========================
Scripit can send text to any program via the 'KEY' command. This command
will translate the string text argrument into a set of raw key events that
are sent to the currently selected window based on a set of rules:
Rule 1: If the window selected is looking for raw key events, the raw
keys will be sent its its message port.
Rule 2: If the window selected is not looking for raw key events, the raw
keys will be sent to the input device. This will then be filtered
by Intuition and sent to the currently active window. So, you must
make sure that the selected window is active by using the
ACTIVATEWINDOW command.
Rule 3: When translating the string argument, all characters will be
converted to raw keys, except when a '\' (a backslash) is found.
The backslash is a command that allows you to specify special keys.
The following table summarizes the backslash commands:
Special RawKey Format:
----------------------
\a Alt Qualifier \o (unused)
\b Backspace \p Pad Qualifier
\c Control Qualifier \q Double-Quote (")
\d Delete \r Right Qualifier Modifier
\e Enter \s Shift Qualifier
\f Function Key: F0 to F9 \t Tab
\g (unused) \u (unused)
\h Help \v (unused)
\i Turn on input device mode \w (unused)
\j Turn off input device mode \x Escape
\k (unused) \y (unused)
\l Left Qualifier Modifier \z End Qualifier.
\m (unused) \\ Backslash
\n Return \### ASCII code. (000 to 255)
Notes:
The \a, \s, and \m qualifier commands always default to using the left
key. e.g. \a will use the Left Alt key. If you need to send a
Right Alt key, use the qualifier modifier 'r' i.e. \ra (or \rs, \rm)
All qualifier commands: \a, \s, \m, and \c are cumlative. i.e.
\a\s\ch will send an Alt-Shift-Control-h sequence.
If you need to send only qualifier events without any actual keys, use
the \z (end qualifier) command. This will terminate the qualifier
cumlating and send a qualifier rawkey event. e.g. \c\lm\rm\z will
send the infamous Control-LeftAmiga-RightAmiga sequence!
If you need to send the rawkeys to the input device, use the \i
command. All text following this will be sent to the input device,
until the string ends, or until the \j command is found.
Examples:
KEY "Test.\n" Sends 'Test.' then a Return.
KEY "Test,\b.\n" Sends 'Test,' a backspace, then '.' and Return.
KEY "\h" Simulates pressing the Help key.
KEY "\a\rsk" Sends a LeftAlt-RightShift-k.
KEY "\032" Sends the ASCII character # 32.
KEY "\qA Quote.\q" Sends "A Quote." (with the double-quotes.)
KEY "\e" Simulates pressing the Escape key.
KEY "\f2" Simulates pressing Function Key 2. (F2)
KEY "\a\s\f0" Simulates pressing Alt-Shift-F10.