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 >
Text File  |  1989-08-06  |  4KB  |  74 lines

  1.                         Sending Text to a program
  2.                         =========================
  3.  
  4.  
  5. Scripit can send text to any program via the 'KEY' command.  This command
  6. will translate the string text argrument into a set of raw key events that
  7. are sent to the currently selected window based on a set of rules:
  8.  
  9. Rule 1:  If the window selected is looking for raw key events, the raw
  10.          keys will be sent its its message port.
  11.  
  12. Rule 2:  If the window selected is not looking for raw key events, the raw
  13.          keys will be sent to the input device.  This will then be filtered
  14.          by Intuition and sent to the currently active window.  So, you must
  15.          make sure that the selected window is active by using the
  16.          ACTIVATEWINDOW command.
  17.  
  18. Rule 3:  When translating the string argument, all characters will be
  19.          converted to raw keys, except when a '\' (a backslash) is found.
  20.          The backslash is a command that allows you to specify special keys.
  21.  
  22.  
  23.          The following table summarizes the backslash commands:
  24.  
  25.  
  26.  
  27.                            Special RawKey Format:
  28.                            ----------------------
  29.  
  30.     \a      Alt Qualifier                   \o      (unused)                         
  31.     \b      Backspace                       \p      Pad Qualifier            
  32.     \c      Control Qualifier               \q      Double-Quote (")                   
  33.     \d      Delete                          \r      Right Qualifier Modifier
  34.     \e      Enter                           \s      Shift Qualifier
  35.     \f      Function Key:  F0 to F9         \t      Tab
  36.     \g      (unused)                        \u      (unused)
  37.     \h      Help                            \v      (unused)
  38.     \i      Turn on input device mode       \w      (unused)
  39.     \j      Turn off input device mode      \x      Escape
  40.     \k      (unused)                        \y      (unused)
  41.     \l      Left Qualifier Modifier         \z      End Qualifier.
  42.     \m      (unused)                        \\      Backslash
  43.     \n      Return                          \###    ASCII code.  (000 to 255)
  44.    
  45.    
  46. Notes:
  47.         The \a, \s, and \m qualifier commands always default to using the left
  48.         key.  e.g.  \a  will use the Left Alt key.  If you need to send a
  49.         Right Alt key, use the qualifier modifier 'r'  i.e. \ra (or \rs, \rm)
  50.  
  51.         All qualifier commands: \a, \s, \m, and \c are cumlative.  i.e.
  52.         \a\s\ch  will send an  Alt-Shift-Control-h sequence.
  53.  
  54.         If you need to send only qualifier events without any actual keys, use
  55.         the \z (end qualifier) command.  This will terminate the qualifier
  56.         cumlating and send a qualifier rawkey event.  e.g. \c\lm\rm\z will
  57.         send the infamous Control-LeftAmiga-RightAmiga sequence!
  58.  
  59.         If you need to send the rawkeys to the input device, use the \i
  60.         command.  All text following this will be sent to the input device,
  61.         until the string ends, or until the \j command is found.
  62.  
  63. Examples:
  64.  
  65.         KEY "Test.\n"       Sends 'Test.' then a Return.
  66.         KEY "Test,\b.\n"    Sends 'Test,' a backspace, then '.' and Return.
  67.         KEY "\h"            Simulates pressing the Help key.
  68.         KEY "\a\rsk"        Sends a LeftAlt-RightShift-k.
  69.         KEY "\032"          Sends the ASCII character # 32.
  70.         KEY "\qA Quote.\q"  Sends "A Quote." (with the double-quotes.)
  71.         KEY "\e"            Simulates pressing the Escape key.
  72.         KEY "\f2"           Simulates pressing Function Key 2.  (F2)
  73.         KEY "\a\s\f0"       Simulates pressing Alt-Shift-F10.
  74.