home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 274.lha / Scripit_v1.0 / Docs / ARexx.DOC < prev    next >
Text File  |  1989-08-06  |  5KB  |  173 lines

  1.                         The Scripit ARexx Interface
  2.                         ---------------------------
  3.  
  4.  
  5. Scripit can be loaded in 'resident' mode, in which case it will open a port
  6. for ARexx and wait for commands and requests from ARexx.
  7.  
  8. To load Scripit in Resident mode:
  9.  
  10.     Scripit -x [portname]
  11.  
  12.     Where [portname] is the name of the port that Scripit will open.  If no
  13.     portname is specified, 'XIT' will be used.
  14.  
  15.  
  16.     After that, Scripit will just sit and wait for commands from ARexx.
  17.  
  18.  
  19.  
  20.     From ARexx:
  21.     -----------
  22.     
  23.     To find Scripit's port:
  24.  
  25.         address 'XIT'
  26.  
  27.     To issue a command to Scripit:
  28.  
  29.     'commandname arg1 arg2 ... argN'
  30.  
  31.     For Example:
  32.  
  33.     address 'XIT'
  34.     'select Screen Window'
  35.     'closewindow'
  36.  
  37.     Or:
  38.  
  39.     address 'XIT' 'flash'
  40.  
  41.     Example ARexx Script:
  42.  
  43.     /* Test ARexx Scripit */
  44.  
  45.     address XIT
  46.     'verbose off'
  47.     'wb open dh2'
  48.     'wb open access'
  49.     'wb open Access!'
  50.     'waitfor Access #5'
  51.     'menu Phone Re-dial'
  52.  
  53.     This script will:
  54.     1. Find Scripit's portname.
  55.     2. Make sure that verbose mode is off.  (just in case it was turned
  56.        on earlier by another script.)
  57.     3. Open the Workbench DH2 icon.
  58.     4. Open the 'Access' drawer from DH2's window.
  59.     5. Load Access!
  60.     6. Wait for all of Access's five windows to come up.
  61.     7. Send a 'Phone' 'Re-dial' command to Access.
  62.  
  63.  
  64.     Getting Results from Scripit:
  65.     -----------------------------
  66.  
  67.     The command sent from ARexx to Scripit can be any valid Scripit command.
  68.     There is also a set of special 'Query' commands that only work with ARexx.
  69.  
  70.     The Query commands return a result string to ARexx from Scripit depending
  71.     on what the Query command was.  You MUST, however, turn on the RESULTS
  72.     option in ARexx before using any Query command, otherwise no result will
  73.     be returned.
  74.  
  75.     The file 'Test.rexx' has an example rexx script that sets the RESULTS
  76.     option on, loads Scripit, waits for Scripit to load, then sends the some
  77.     query commands to Scripit.
  78.  
  79.  
  80.     The following is the list of Query commands:
  81.  
  82.  
  83.  
  84.                     Query Commands:  For use with ARexx only
  85.                     ----------------------------------------
  86.  
  87. QUERY WINDOW
  88.  
  89.             Returns the name currently selected window.
  90.  
  91. QUERY SCREEN
  92.  
  93.             Returns the name of the screen of the currently selected window.
  94.  
  95. QUERY WINDATA
  96.  
  97.             Returns data on the currently selected window in the following
  98.             format:
  99.             [LeftEdge] [TopEdge] [Width] [Height]
  100.  
  101. QUERY SCREENDATA
  102.  
  103.             Returns data on the currently selected screen in the following
  104.             format:
  105.             [LeftEdge] [TopEdge] [Width] [Height]
  106.  
  107. QUERY WINLIMITS
  108.  
  109.             Returns the window limits of the currently selected window in the
  110.             following format:
  111.             [MinWidth] [MinHeight] [MaxWidth] [MaxHeigth]
  112.  
  113. QUERY ACTIVEWINDOW
  114.  
  115.             Returns the name of the currently active window.
  116.  
  117. QUERY ACTIVESCREEN
  118.  
  119.             Returns the name of the currently active screen.
  120.  
  121. QUERY SCREENFLAGS
  122.  
  123.             Returns a string with the mode of the current screen.
  124.  
  125. QUERY WINDOWFLAGS
  126.  
  127.             Returns a string with the mode of the current window.
  128.  
  129. QUERY TEXTMODE
  130.  
  131.             Returns the current text mode of the selected window.
  132.             Format: [Left] [Top] [FrontPen] [BackPen] [DrawMode]
  133.             e.g.  10 10 1 0 JAM1
  134.  
  135. QUERY FONT
  136.  
  137.             Returns the current font of the selected window.
  138.             Format: [Fontname] [Fontsize]
  139.             e.g. topaz 11
  140.  
  141. QUERY MODE  <mode>
  142.  
  143.             Sets the current result returning method to ARexx.  Mode can be
  144.             SHORT, LONG, or BOTH.
  145.  
  146. QUERY POINTERPOS
  147.  
  148.             Returns the current position of the pointer in the front screen.
  149.             Format:  [pointer x] [pointer y]
  150.  
  151. QUERY MOUSEPOS
  152.  
  153.             Returns the current position of the mouse relative to the
  154.             currently selected window.
  155.             Format:  [mouse x] [mouse y]
  156.  
  157. QUERY PATH  <filename>
  158.  
  159.             Returns the full path to the file or directory specified.
  160.             The returned string will contain the full pathname to the file.
  161.  
  162. QUIT        This will tell Scripit to leave the resident mode, close its
  163.             ARexx port, and quit completely.  Only use this if you really
  164.             want Scripit to unload itself.
  165.  
  166.  
  167. Note:       In all QUERY commands, QUERY can be replaced with a question mark.
  168. -----       e.g.  'Q WINDOW' is the same as 'QUERY WINDOW'.
  169.  
  170.  
  171.  
  172.                       Copyright 1989  Khalid Aldoseri.
  173.