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

  1.                            PRELIMINARY DOCUMENTATION
  2.  
  3.  
  4.                     Scripit  --  The Intuition Script Language
  5.                     ==========================================
  6.  
  7.  
  8.                                By: Khalid Aldoseri
  9.                                -------------------
  10.  
  11.  
  12. 'Scripit' is a script processor that reads in a script file and executes any
  13. commands it finds in that file.  The commands are executed sequentially.
  14.  
  15.  
  16. To use Scripit just issue the following command from CLI:
  17.  
  18.  
  19.         Scripit  scriptfilename
  20.  
  21.  
  22. The format of the Scripit scriptfile should be normal text lines ending with
  23. a carriage return.  The accompanying file 'Commands' describes all the
  24. available commands as well as their structure.
  25.  
  26.     Format: Scripit [flags] [scriptfile]
  27.  
  28.      Flags: -v  Turns on Verbose mode.
  29.             -d  Turns on Debug mode.
  30.             -x  Loads Scripit Resident Arexx mode.
  31.                 Format: Scripit -x [portname]
  32.                 Where PortName is the portname Scripit will be referenced
  33.                 by from ARexx.
  34.             -c  Compile Script.
  35.                 Format: Scripit -c [input file] [output file]
  36.             -w  Disable Warnings.
  37.  
  38. Scripit's commands control other programs by manipulating their menus, gadgets
  39. windows, and screens.  The programs being controlled do not need any special
  40. ports as all the messages they receive are simulated Intuition messages.  In
  41. fact, the programs don't even recognize that it isn't Intuition talking to
  42. them!
  43.  
  44. You can also run Scripit from WB by clicking on its icon and then selecting
  45. the script file from the file requester.  (The file requester will first
  46. search for a directory called Scripit:.  If it doesn't find it, it will
  47. use the current directory.)
  48.  
  49.  
  50. Compiling Scripts:
  51. ------------------
  52.  
  53. Scripit can compile scripts into a special format that is usually around
  54. 30%-50% smaller in size than the original file and runs a lot quicker.
  55. These files are automatically idetified by Scripit.
  56.  
  57. To compile a script:
  58.     Scripit -c [inputfile] [outputfile]
  59.  
  60.     e.g.  Scripit -s Access Acc
  61.     This creates a compiled file called 'Acc'.
  62.  
  63. To run a compiled script:
  64.  
  65.     Scripit Acc
  66. OR  Xit Acc
  67.  
  68.     'Xit' is a special version of Scripit that _only_ runs compiled files.
  69. It is a lot smaller in size than Scripit, which allows it to load a lot
  70. faster.  If you try to execute a non-compiled script with 'Xit' it will
  71. just quit.
  72.  
  73. Note: Compiled Scripit files can be identified by the first four bytes
  74.       in the file.  They are 'X' 'I' 'T' '1'.
  75.  
  76.  
  77. When you specify a non-compiled script file name to Scripit, it will
  78. automatically compile it and then run it.  However, if Scripit cannot
  79. read in the whole file at once, (like when using '*' as a file name or
  80. through pipes or if it cannot allocate enough memory to load in the
  81. whole file at once) it will compile and execute it line by line.
  82. Using 'Scripit *' will allow you to enter the 'live mode' where you
  83. can enter commands directly from the console and each command will be
  84. executed one by one as you type them in.
  85.  
  86.  
  87. Using Scripit from Workbench:
  88. -----------------------------
  89.  
  90. To use Scripit from the Workbench just double-click on its icon.  The
  91. file requester will come up allowing you to select a script file to
  92. execute.  You can also auto-invoke a script by double-clicking on
  93. the script file's icon.  Both 'Scripit' and 'Xit' can execute
  94. scripts this way, however 'Xit' doesn't have a file-requester.
  95. You can use any icon file as the script icon as long as it is
  96. a project icon can be used.  Just make sure that the tool name points
  97. to either Scripit (for normal scripts) or Xit (for compiled scripts.)
  98.  
  99.  
  100. Supporting Programs:
  101. --------------------
  102.  
  103. 1.  Recorder:
  104.  
  105.     This is a general Intuition event recorder that records what the user is
  106.     doing and saves it to a file you select.  This saved file is totally
  107.     compatible with Scripit and when run from Scripit will recreate the
  108.     original user activities as closely as possible.
  109.  
  110.     This is _not_ a keyboard and mouse macro recorder.  It actually records all
  111.     messages going from Intuition to the currently active window.  It will also
  112.     monitor what the active window is, and if it changes Recorder will add the
  113.     necessary commands to change the active window in the script as well.
  114.  
  115.     The file created by Recorder can be edited as it is a normal script file.
  116.  
  117.     To use Recorder, just run it from CLI:   Recorder scriptfilename
  118.  
  119.     After that do all the 'actions' you want, and when you want to stop the
  120.     recording, send it a Control-C by either clicking into the CLI window and
  121.     pressing Control-C or by using the 'break' command, or by closing its
  122.     window.  (Note: the power LED will flicker as long as it is recording.)
  123.  
  124.     To execute the saved script just use:  Scripit scriptfilename
  125.  
  126.     Recorder has several options.  (Use Recorder ? to see the options.)
  127.  
  128.     Format: Recorder [-flags] [scriptfile]
  129.  
  130.      Flags: -c  Adds comments to script.
  131.             -w  Do not open display window.
  132.             -l  Disable power LED activity meter.
  133.             -n  Use menu & gadget numbers instead of text.
  134.             -t  Disable time recording.
  135.             -m  Disable MouseMoves recording.
  136.             -i  Disable Intuiticks recording.
  137.  
  138.  
  139. 2.  Lister
  140.  
  141.     This is a general screen, window, menu and gadget listing facility that
  142.     will help in identifying the correct names or numbers of the items to be
  143.     controlled.
  144.  
  145.     To use Lister, just run it.  You will get a list of screens in the system.
  146.     You can then see the windows in a specific screen by typing the first few
  147.     letters of the screen name as Lister's first argument.  You can go on to
  148.     specify window, menu, menuitem, subitem, or gadget.  The format is:
  149.  
  150.     Format:  Lister  [screen] [window] [menu] [item] [subitem]
  151.         or:  Lister  [screen] [window] -g [gadget]
  152.  
  153.  
  154.  
  155.     If you would like to have a look at sample scripts, just look at the file
  156.     that Recorder produces.  :-)
  157.  
  158. 3.  XitLoadWB
  159.  
  160.     This program allows Scripit to control the WorkBench.  Read the doc file
  161.     'WBench.DOC' for details on its usage.
  162.  
  163. 4.  AutoScript
  164.  
  165.     Makes scripts auto-run.  Read 'AutoScr.DOC' for details.
  166.  
  167.  
  168. Notes on file requester:
  169.  
  170.     The file requester has two hidden features:
  171.  
  172.     1. click on the right mouse button to get a list of the volume names of
  173.        devices currently in the system.  Click on it again to get the list
  174.        of 'logical' devices, i.e. assigns;
  175.     2. you can resize the file requester, the resize gadget is at the bottom
  176.        of the requester, all across the bottom border.
  177.  
  178.  
  179. All comments, suggestions, bug reports, etc. should be send to:
  180.  
  181.     Khalid Aldoseri, CIS 75166,2531.
  182.  
  183.  
  184.  
  185.     Many thanks to Vic Wagner for his help with the script language,
  186.     Larry Phillips for coming up with the name 'Scripit', and mostly
  187.     to Brian J. Bartlett for countless hours in conference testing Scripit
  188.     and for lots of great suggestions.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                       Copyright 1989  Khalid Aldoseri.
  196.