home *** CD-ROM | disk | FTP | other *** search
/ Merciful 3 / Merciful_Release_3.bin / software / d / data_division_docs / datadivisiondocs02.dms / datadivisiondocs02.adf / 12 < prev    next >
Text File  |  1996-10-14  |  7KB  |  173 lines

  1.  
  2.                               Chapter Eleven
  3.  
  4. The Scripts Editor ..............................133
  5. The Editor ......................................134
  6. The Script Editor Menus .........................136
  7. Sample Scripts ..................................137
  8.  
  9.                             The Scripts Editor
  10.  
  11.  Scripts are a new feature for Opus 5.5.  A Script is a special type of 
  12. Opus button which is invoked when a specific event occurs.  As with Opus 
  13. buttons, menus and hotkeys,  Scripts may define a set of instructions 
  14. which include any mix of AmigaDOS, Workbench, ARexx, script or internal 
  15. Opus 5 commands.
  16.  
  17.  Opus can call a Script whenever any of the following system events 
  18. occur:-
  19.  
  20.  Bad disk inserted: Activated whenever a disk of unknown format is
  21.                     inserted into any floppy drive.  As an example, this
  22.                     Script could be used to prompt the user to format the
  23.                     disk.
  24.  
  25.  Close buttons:  Activated whenever a Button Bank is closed.
  26.  
  27.  Close group:  Activated whenever a Group window is closed.
  28.  
  29.  Close lister:  Activated whenever any Lister is closed.
  30.  
  31.  Disk inserted:  Activated whenever a disk of known format is inserted
  32.                  into any floppy drive.  As an example, this Script could
  33.                  be used to play a sound file or make a beep when you
  34.                  insert a disk.  Alternatively it could automatically open
  35.                  a lister and display the contents of the inserted disk.
  36.                  Or even both?
  37.  
  38.  Disk removed:  Activated when a disk is removed from any floppy drive.
  39.                 Maybe use this to play a different sound?
  40.  
  41.                              Directory Opus 5                        113
  42.  
  43.  Double-click:  Activated when the LMB is double-clicked on any clear part
  44.                 of the Opus 5 Main Window, but it is not activated when
  45.                 the mouse is over any other Opus element such as a lister
  46.                 or button bank etc.  One handy use for this Script is to
  47.                 open a new lister or device list as shown below.
  48.  
  49.  Hide:  Activated when Opus 5 is iconified.
  50.  
  51.  Middle double-click:  Activated whenever the MMB is double-clicked
  52.                        providing the mouse is not over any button which
  53.                        has a MMB function defined.  This Script will even
  54.                        be activated if Directory Opus is not the active
  55.                        process.
  56.  
  57.  Open buttons:  Activated whenever any Button Bank is opened.
  58.  
  59.  Open group:  Activated whenever any Group window is opened.
  60.  
  61.  Open lister:  Activated whenever a Lister is opened.
  62.  
  63.  Reveal:  Activated when Opus is de-iconified, by pressing the hot key
  64.           combination, Ctrl + lshift + lAlt, for example.
  65.  
  66.  Right double-click:  Activated whenever the RMB is double-clicked and the
  67.                       mouse is not in a position which would normally
  68.                       activate a menu or a RMB function for any button.
  69.  
  70.  Shutdown:  Is executed immediately before Opus 5 quits.
  71.  
  72.  Startup:  Is executed when Opus 5 is first started.
  73.  
  74.                                 The Editor
  75.  
  76.  The Script Editor displays the names of all of the events supported by 
  77. Opus and allows you to add, edit or delete the command instructions 
  78. attached to each event.  An event which has attached commands is shown in 
  79. white (Colour 1), while events with no defined commands is shown in black 
  80. (Colour 2).
  81.  
  82.     134                      Directory Opus 5
  83.  
  84.  *** See Fig 11-01 ***
  85.  
  86.  Scripts:  Displays names of the available Scripts.  Scripts which have
  87.            functions attached are shown in a highlighted colour.
  88.  
  89.  Delete:  Deletes the function associated with the selected Script.
  90.  
  91.  Edit:  Allows you to edit the functions attached to the selected Script
  92.         with the Opus Function Editor.  The Function Editor can also be
  93.         opened by double-clicking on the desired Script.
  94.  
  95.  Save:  Saves the currently displayed Scripts to disk and updates those
  96.         currently used by Opus.  Note that this saves the Scripts using
  97.         the 'current' filename, that is, the name under which the Scripts
  98.         were loaded.  Any previous file of this name will be overwritten.
  99.  
  100.  Use:  Updates the Scripts currently used by Opus but does not save them
  101.        to disk.
  102.  
  103.  Cancel:  Cancels all changes you have made to the Scripts.
  104.  
  105.                              Diectory Opus 5                         135
  106.                              
  107.                          The Script Editor Menus
  108.  
  109.  As with the other editors in Opus 5, there are extra options provided by 
  110. menus.  These are:-
  111.  
  112.                              The Project Menu
  113.  
  114.  New:  Creates a new blank Script list.
  115.  
  116.  Open:  Displays a file requester allowing you to load a new set of
  117.         Scripts.
  118.  
  119.  When first run, Opus uses a default filename for the Scripts file.  Once 
  120. you load a new set of Scripts using a different name, this new name will 
  121. be kept and used internally as the reference to those Scripts.  If you 
  122. subsequently save the particular set of Scripts, they will be saved under 
  123. this name unless you use the SaveAS option.  If you save the Environment, 
  124. this 'new' filename will be stored with the environment.
  125.  
  126.  Save:  Saves the displayed Scripts to disk under the current name.
  127.  
  128.  SaveAs:  Saves the current Scripts but allows you to select a new
  129.           filename.
  130.  
  131.  Quit:  Same as Cancel above.
  132.  
  133.                               The Edit Menu
  134.  
  135.  Reset to Defaults:  Resets the Scripts to the default set as defined when
  136.                      you installed Directory Opus 5.  Because there are
  137.                      many settings, these defaults are not actually built-
  138.                      in to Opus 5, instead Opus will look for and load a
  139.                      special default file.
  140.  
  141.  Last Saved:  Reloads and installs the last saved set of Scripts.
  142.  
  143.  Restore:  Abandons any changes you have made and restores the Scripts to
  144.            the state as when you first opened the Script Editor.
  145.  
  146.     136                      Directory Opus 5
  147.  
  148.                               Sample Scripts
  149.  
  150.  Opus 5.5 comes with just two simple Scripts installed.  These are :-
  151.  
  152.  Double-Click: This is set to call the command 'DeviceList NEW' which will
  153.                open a new Lister whenever you double-click the LMB on the
  154.                Opus Main Window.
  155.  
  156.  Middle Double-Click: Runs the AmigaDos command NewShell to open a new
  157.                       Shell window on either your Opus screen, if it has
  158.                       been set to Default Public Screen, or the Workbench
  159.                       screen.
  160.  
  161.  There are many easy and simple uses for Scripts.  Try the following for 
  162. the disk inserted and disk removed Scripts.  Add the command,  'PLAY QUIET 
  163. <sound>' where <sound> is the full file path to a favourite sound 
  164. effect.This page is left intentionaly blank.
  165.  
  166.                              Directory Opus 5                        137
  167.                              
  168.                    This page is left intentionaly blank
  169.  
  170.     138                      Directory Opus 5
  171.  
  172.  
  173.