The Hitchhiker's Guide to Directory Opus Addenda V2.05 REL/E 19th May 1991 ------------------------------------------------------------------------------- There was a problem with Auto Diskchange, which has now been fixed. There was also a problem displaying the sizes of directories >9999999 bytes long. That has also been fixed. The PRINT requester has a new gadget at the bottom : Draft/NLQ. NLQ is now gone from the style gadgets. The four settings of the new gadget are Draft, NLQ, Hdr Draft and Hdr NLQ. Draft will cause the entire document to be printed in draft mode (including headers and footers). NLQ will do likewise except in NLQ. Hdr Draft will cause the headers and footers to be printed in draft mode and the rest of the document in NLQ. Hdr NLQ will cause the headers and footers to be printed in NLQ mode and the rest of the document in Draft. To set the state of Draft/NLQ from ARexx, the SETPRINT1 command takes an extra parameter (0=Draft, 1=NLQ, 2=Hdr Draft, 3=Hdr NLQ). There is another new feature : ALL is also a rmbgadget. Selecting ALL with the right mouse button causes all selected files to be unselected, and vice versa. The ARexx command for this is TOGGLE. ------------------------------------------------------------------------------- V2.05 REL/A 22nd Apr 1991 ------------------------------------------------------------------------------- Introduction This Addenda details modifications and new features added to Directory Opus since the printing of the manual. It covers changes from v2.01 REL/A through to v2.05 REL/A. You MUST have read the manual before reading any further in this document. This Addenda is laid out as if it were a part of the manual, but it is in no way complete, and only describes changes to functions. It does not give complete documentation on the function itself. This document will be incorporated in the manual at the next printing. Further changes before then will be described in a text file on the Directory Opus distribution disk. If you have any questions, comments or suggestions relating to Directory Opus and the documentation, please conact the author at the address below. Jonathan Potter P.O. Box 289 Goodwood, SA 5034 Australia Phone (08) 2932788 FidoNet 3:680/829 Internet jpotter@itd.adelaide.edu.au ------------------------------------------------------------------------------- Chapter 2 Addenda Screen Gadgets ARCHIVE The ARCHIVE gadget allows you to list, extract from or create archives, using the popular archivers Arc, Zoo and LHArc. LHArc is the recommended archiver. The nine call functions used for the archivers (a list, extract and create function for each of the three archivers) are described in the Chapter 6 addenda below. To list an archive, select the archive (or archives) you wish to list, and click on the ARCHIVE gadget with the left mouse button. The archive type is automatically determined, and the archive is listed using the defined call function. You may also list an archive by doubleclicking on it (with File doubleclick turned on in the configuration). To extract an archive, select the archive (or archives) and click on the ARCHIVE gadget with the right mouse button. The default call functions cause the extracted files to be sent to the destination directory (inactive window). To add files to an archive, select the files you wish to add, and click on the ARCHIVE gadget. Unless the FIRST selected file is an archive itself, Directory Opus will assume you wish to add these files to an archive. The default call functions cause you to be prompted for an archive name, and the archived file is written to the destination directory. BYTE If any directories are selected when BYTE is chosen, the directories that do not already have a size displayed (see below) are scanned, and the size of the directory is calculated and displayed. If the directory size for a directory is already displayed, then the directory will not be re-scanned even if it is selected and BYTE is chosen. This could mean that the directory size is inaccurate, especially if any files have been created or deleted in it by another program. Selecting one or more directories, and then clicking on BYTE with the right mouse button (it is also an rmbgadget), will cause the directory sizes (if displayed) to disappear. You can then reselect the directories, choose BYTE (with the left mouse button), and they will be re-scanned. COPY The COPY gadget copies all selected files in the active directory window, to the inactive directory window, keeping the same names. If, however, the COPY gadget is selected with the right mouse button instead of with the left (as an rmbgadget), you will be given the chance to give a new name to each copied file. This has the same effect as copying the files across, and then renaming them. DATESTAMP The DATESTAMP gadget functions slightly differently to what is described in the manual. When you select the gadget, you are presented with a requester, asking you to enter the date and time. This allows you to datestamp files with a date other than the system date. If you wish to use your own date, enter the date and/or time in the format DD-MMM-YY HH:MM:SS. Otherwise, just press return (on a blank string) and the system date and time will be used. NEWCLI The NEWCLI gadget has been removed, to make way for the ARCHIVE gadget. To open a NEWCLI now, you should select the RUN gadget with no files selected. PLAY Double-clicking on an IFF 8SVX file (with File doubleclick enabled) will now play the sampled sound continuously, not exiting until either mouse button is pressed. The PLAY gadget (with the left mouse button) still plays each sound once only, but if the PLAY gadget is selected with the right mouse button (as an rmbgadget), the sounds are looped, and Directory Opus will not proceed on to the next one until the left mouse button is pressed (the right mouse button will abort the PLAY operation). PLAY can now play SoundTracker modules, provided that the streplay.library file is present in the LIBS: directory. Modules are recognised by the mod. prefix in the filename; if the filename does not have this prefix, it will not be played. PARENT The PARENT gadget itself has not changed in operation. However, in response to the requests of several users, two PARENT gadgets have been added at the sides of the directory windows (on the left of the left window, and on the right of the right window). These gadgets are not actually marked as PARENT, but instead form the border of the Directory Opus screen. You may find it easier to use these gadgets to access the parent directory rather than move the mouse down to the PARENT gadget below. These gadgets function in exactly the same way as the PARENT gadget, including taking notice of the Smart parent/root configuration item. PRINT The PRINT routine is now a full-featured text formatter. There are several configuration items in the PRINT requester : Page length : This is the length of each page, in lines. Left margin : This is the position of the left margin, in characters. Right margin : This is the position of the right margin. Tab : This is the number of spaces a tab character is equivalent to. You can have a header and/or a footer printed at the top and bottom of each page if you wish. Both the header and footer can consist of the title, the current date and the page number. You may select any combination of Title, Date and Page # you wish. If none are selected, the header or footer is not printed. You may also select the typestyle of the header and the footer, by clicking on the gadgets that initially say Normal. These allow you to cycle through the various typestyles available : Normal, NLQ, Bold, Italics, Underline, Double strike and Shadow. Note that some printers may not have all these typestyles available. You may enter a title (to be used in the header and footer) in the Title string gadget. Leaving this blank will use the name of the file as a title. The Output gadget allows you to specify where you want the output of the print process to go to. This defaults to PRT:, but you may choose to have the output sent to a disk file. In this case, simply enter the path and the name of the file you wish to print to. The gadget marked Normal at the bottom of the print requester operates in the same way as the header and footer typestyle gadgets, except that it determines the typestyle for the whole document (excluding headers and footers). The gadget next to this one determines whether or not the last page of the file to be printed is followed by a formfeed character, ejecting it. To start the print operation, select the Print gadget. There are three ways to abort a print operation in process. If the print operation has not been spooled to the printer; that is, Directory Opus is frozen, waiting for the printer to finish, just press the left and right mouse buttons together, in the normal fashion. If, however, the file has been spooled to the printer, selecting the PRINT gadget again will allow you to cancel the print. Choosing Quit will also give you the option of cancelling a print operation in process. PRINT will now print text crunched by PowerPacker. The same conditions apply as in READ, except that PRINT will NOT print text that has been encrypted under PowerPacker with a password. If you wish to print encrypted text you will need to READ the file and print from within the text viewer. READ The PowerPacker decrunching routines in the built-in text viewer have been replaced by calls to the powerpacker.library (by Nico Francois). This library is NOT distributed with Directory Opus, so if you wish to read powerpackered text you will need to find a copy of this library and copy it to your LIBS: directory. The powerpacker.library is available on Fish Disk 414 among others. Check your local PD library. SHOW This function will now display Dynamic Hi-Res pictures (4096 colours in high resolution) created by Macro Paint (from Lake Forest Logic). This format is NOT the same as the Dynamic Hi-Res pictures created by NewTek's DigiView, which Directory Opus will not show. ------------------------------------------------------------------------------- Chapter 4 Addenda Configuration Menu Custom Functions The operation of custom functions has changed radically from previous versions. Before, custom functions were run as programs; that is, the program you entered on the call function line was simply run. This led to some severe limitations, namely : a) Maximum function length of 256 characters. b) No input could be typed at the output window. c) The current directory of the function was always set to the boot device. d) The stack of the function was always 4000 bytes. e) The priority of the function was always 0. f) Functions run asynchronously could not have output (or input). In the new approach to custom functions, temporary script files are created in the T: directory. This has many advantages over the previous method, in that the above limitations no longer exist. One of the few disadvantages is a slightly longer operation time, as the script file must be created each time the function is used. This extra time is negligible if the T: directory is assigned to a hard drive, or the RAM disk. If you do not have a hard drive, you should include the line Assign T: RAM: in your startup-sequence. Another disadvantage is that an extra program is needed. This program is called DOpusRT, and can be found in the C directory of the distribution disk. This is only 3K long, and should be copied to your C: directory. The DOpusRT program is called at the end of the script file, and communicates with Directory Opus to inform it when the script file has finished running. This is needed for functions that are not run asynchronously. It also doubles as a new wait command, which is needed for the adjustable close delay (explained later). To take advantage of the current directory changing, adjustable stack and priority, you will need the commands cd, stack and changetaskpri in your C: directory. You will also need the commands run, execute, failat, newcli and endcli. These are almost always present in your C: directory anyway, so you should not need to install them. The options involved in defining a custom gadget are listed in full below. The same options apply to custom menus. Gadget Name This is the actual name of the gadget that will appear on the screen. Call Function This is the AmigaDOS name (including complete path) of the function that is to be called when this gadget is selected. This can contain control sequences, allowing you to do special things with the function. {aTitle} The function will ask you for arguments whenever this sequence appears. The Title string is the title that will appear on the argument requester. You can just have {a}, in which case a default title will be used. {d} This will insert the path name of the destination directory window into the call function. {dr} The same as {d} except that it causes the destination directory to be re-read at the end of the procedure. {Dr} This will cause the destination directory to be re-read, but the pathname will NOT be inserted into the call function. {f} The name of the first selected entry will be inserted into the call function for this particular time. The entry is deselected. {fu} The same as {f} except that the entry is not deselected. {F} The names of ALL selected entries are inserted into the call function at this point. The new "script file" approach to custom functions means that if the length of a call function exceeds 256 characters because of a {F} sequence (or for any reason), a new line in the script file is added, containing the next lot of filenames. This means that you can select as many entries as you wish with a {F} sequence, and they will all be accepted. {Fu} The same as {F} except that the entries are not deselected. {o} The same as {f} except that only the name of the first selected entry is used, without the pathname. {ou} The same as {o} except that the entry is not deselected after it is used. {O} The same as {F} except that only the names of the selected entries are used, without the pathname. {Ou} The same as {O} except that the entries are not deselected after they are used. {s} This will insert the path name of the source directory window into the call function. {sr} The same as {s} except that it causes the source directory to be re-read at the end of the procedure. {Sr} This will cause the source directory to be re-read, but the pathname will NOT be inserted into the call function. Stack size This allows you to set the stack size of the custom function. The minimum and default is 4000 bytes. The documentation of the program you are running should advise you of the best stack size to use. Priority This allows you to determine the priority at which the custom function runs. The default is 0. You should not use anything lower than -10, or higher than 10, except for certain programs (the documentation of the program should advise you of appropriate priorities). Close delay This allows you to set the number of seconds after the function has finished before the output window closes. The default is 2, which means that the output window will close 2 seconds after the function has terminated. If you set the close delay to 0, the output window will close immediately. If you set it to -1, it will wait for you to press the left mouse button before closing. Executable program This allows you to determine whether the function is an Executable program, a Batch file or an ARexx script. The control sequences in the call function (see above) are only taken into account for executables and batch files. All of the flags (see below) are ignored for ARexx scripts. Output window If this is enabled an output window will be opened every time this custom gadget is used. The window will open on the Directory Opus screen, unless the Workbench to front option is turned on, or the Start function asynchronously option is enabled. In this case, it will open on the Workbench screen, and the Workbench screen will be automatically brought to the front. The window is opened using the handle specified by the Output option in the configuration. Start function asynchronously If this is on, the function will be launched as a new process, and Directory Opus will not wait for it to return. If this is the case, and an output window is specified, the output window opens on the Workbench screen. Change to source directory If this is turned on, the current directory of the custom function will be set to the current source directory (active directory window). Change to destination directory If this is turned on, the current directory of the custom function will be set to the current destination directory (inactive directory window). Do all files This causes the function to act on each selected entry in turn, instead of just the first entry. This is used for commands that do not support multiple filenames on the command line, where {F} to send all selected entries would not work. Workbench to front This causes the Workbench screen to be brought to the front when the function is selected. Directory Opus screen to front This causes the Directory Opus screen to be brought to the front when the function has terminated. It is used in conjunction with Workbench to front. It will not work if Start function asynchronously is turned on. There are a couple of other points to be aware of. Because custom functions now run as a script file, they can be aborted like any other script file by pressing CTRL-D. This is only possible if you have an output window selected. If the script file is aborted, the output window effectively turns into a CLI, and as such, you must type endcli to remove the window. Another point is that if the function was not run asynchronously, Directory Opus will be frozen, waiting for the signal back from the DOpusRT program. If you abort the script file before it reaches DOpusRT, Directory Opus will never return. You can force Directory Opus to unfreeze by activating the Directory Opus window and pressing SHIFT-ESC (the shift key in conjunction with the escape key). This also allows you to turn any non-asynchronous function into an asynchronous function, while the function is running. Note that when using NewCLI or NewShell as the Output cmd (described later), an error such as unknown command will abort the script file as well. You should therefore make sure that all your custom functions do not try to run non-existant programs. Drive Gadgets There are now eighteen drive gadgets, instead of the old twelve. They are displayed as three lots of six (as opposed to the two lots of six before). ------------------------------------------------------------------------------- Chapter 6 Addenda Configuring Directory Opus The configuration requester now has two faces. At the bottom left of the requester there is a gadget labelled More Config. Selecting this will display the second configuration requester. This requester allows you to modify the following options : Output Window This allows you to determine whether or not programs launched by doubleclicking or the RUN and EXECUTE gadgets have an output window. Run asynchronously This allows you to determine whether or not programs launched by doubleclicking or the RUN and EXECUTE gadgets are run asynchronously. The same rules apply to output windows with Run asynchronously as with the custom functions (see above). CD source This sets the current directory of programs launched by doubleclicking or the RUN and EXECUTE gadgets to the source directory (active window). CD destination This sets the current directory of programs launched by doubleclicking or the RUN and EXECUTE gadgets to the destination directory (inactive window). Workbench to front This causes the Workbench to be brought to the front whenever a program is launched by doubleclicking or the RUN and EXECUTE gadgets. Dir Opus to front This causes the Directory Opus screen to be brought to the front whenever a program launched by doubleclicking or the RUN and EXECUTE gadgets terminates. Priority This sets the default priority of programs launched by doubleclicking or the RUN and EXECUTE gadgets. Stack This sets the default stack size of programs launched by doubleclicking or the RUN and EXECUTE gadgets. The default and minimum is 4000 bytes. Output This allows you to define the handle used to open the output window for ALL launched programs (custom functions, doubleclicking, RUN and EXECUTE, etc.). Output cmd This allows you to define the command that is used to execute the script file created for ALL launched programs (custom functions, doubleclicking, RUN and EXECUTE, etc.). It defaults to c:NewCLI. If you wish to use a shell instead of a CLI, you should change it to c:NewShell. Likewise, if you wish to use a WShell, you should change it to c:NewWsh. Close delay This allows you to specify the close delay for programs launched by doubleclicking and the RUN and EXECUTE gadgets. This is the amount of time the output window remains after the program has terminated. Archive type This allows you to select the archiver (Arc, Zoo or LHArc) you wish to use to create archives (see the ARCHIVE gadget discussed above). Archive select gadgets There are nine gadgets running down the left hand side of the requester. There are titled Arc/Zoo/LHArc list, extract and add. They allow you to configure the flags, stack, priority and close delay of the nine archiving functions. Selecting one of these gadgets causes the gadgets above to change, to reflect the current state for the function you have chosen. If none of the nine gadgets are selected, the gadgets above reflect the state of programs launched by doubleclicking, and the RUN and EXECUTE gadgets. The only gadgets above that do not change are Output and Output cmd, as these are global and affect all launched programs (including the archivers). Archive call functions Next to each of the archive select gadgets is a string gadget containing the call function for that particular archive function. The default archive call functions are probably acceptable, but you may wish to modify them, if, for instance, you wish to use the public domain program LZ instead of LHArc. An additional configuration item has been added to the first configuration requester. CPU monitor, when turned on, causes Directory Opus to display the current CPU usage (as a percentage) in the clock at the bottom of the screen, and in the clock in the iconified window (if enabled). You may discover some programs (especially communication software) are slowed down slightly by the CPU monitor, but it does not usually cause a problem. ------------------------------------------------------------------------------- Chapter 7 Addenda General Information Directory Sizes When any complete operation is performed on a directory (eg COPY, PROTECT, HUNT, etc.), the total number of bytes in that directory (ie the sum of the lengths of all files in that directory and its subdirectories) is displayed as the size of that directory. This only occurs after a complete operation has been performed; if the operation is aborted midstream (by operator or by error), the size is not shown. ------------------------------------------------------------------------------- Chapter 8 Addenda ARexx Interface AREXX COMMANDS setprint1 [length] [lmargin] [rmargin] [tabs] [style] [formfeed] This allows you to configure the print routine. length = length of the page in lines lmargin = character position of the left margin rmargin = character position of the right margin tabs = number of spaces a tab is equivalent to style = the style the text will be printed in ; Normal=1, NLQ=2, Bold=3, Italics=4, U.line=5, DoubStrk=6, Shadow=7 formfeed = 0=eject page, 1=no eject setprint2 [header] [footer] [hstyle] [fstyle] [title] [output] This allows you to configure the print routine. header = flags to turn on in header (add the chosen ones) ; 0=no header, 1=title, 2=date, 4=page footer = flags to turn on in footer hstyle = the style the header will be printed in ; Normal=1, NLQ=2, Bold=3, Italics=4, U.line=5, DoubStrk=6, Shadow=7 fstyle = the style the footer will be printed in title = the title that will be printed, "" for name of file byte This command has the same effect as selecting the BYTE gadget. unbyte This command has the same effect as clicking BYTE with the right mouse button (see above). lplay This will play sound files continuously, requiring a mouse button click to proceed to the next one. nncopy This allows you to copy all selected files, and will prompt you for a new name for each. If filename is given, just that file is copied. If newname is given with filename, newname is used as the new name. Status commands 64 Custom gadget flags [gadget] This returns the flags of the specified custom gadget. The flags are : Output window 1 Run asynchronously 2 Executable 4 \ Batch file 8 |- these three are mutually exclusive ARexx script 16 / Workbench to front 32 Do all files 64 Dir Opus to front 128 CD source 256 CD destination 512 These flags are then added together into one value. 75 Top text justification This returns a value indicating whether the text in the status bar is centered (0), left-justified (1) or right-justified (2). This can also be set. 76 Close delay This returns or sets the close delay for programs launched by doubleclicking or the RUN and EXECUTE gadgets. 77 Priority This returns or sets the priority for programs launched by doubleclicking or the RUN and EXECUTE gadgets. 78 Stack This returns or sets the priority for programs launched by doubleclicking or the RUN and EXECUTE gadgets. 79 Output cmd This returns or sets the Output cmd, used to launch ALL programs (see above). 80 CD source This returns a boolean value indicating whether CD source is turned on in the configuration (this can also be set). 81 Dir Opus to front This returns a boolean value indicating whether Dir Opus to front is turned on in the configuration (this also can be set). 82 Output Window This returns a boolean value indicating whether Output Window is turned on in the configuration (this can also be set). 83 CD destination This returns a boolean value indicating whether CD destination is turned on in the configuration (this can also be set). 84 Archive type This returns or sets the current archive type : Arc=0, Zoo=1, LHArc=2 85 Archive call function [archiver] This returns or sets the call function used for the archive function specified by archiver. archiver is a value from 0 to 8. 86 Archive close delay [archiver] This returns or sets the close delay used for the archive function specified by archiver. 87 Archive priority [archiver] This returns or sets the default priority of the archive function specified by archiver. 88 Archive stack [archiver] This returns or sets the default stack size of the archive function specified by archiver. 89 Archive flags [archiver] This returns the flags of the specified archive function. The flags are : Output window 1 Run asynchronously 2 Workbench to front 32 Dir Opus to front 128 CD source 256 CD destination 512 These flags are then added together into one value. 90 CPU monitor This returns a boolean value indicating whether the CPU monitor is turned on or not. -------------------------------------------------------------------------------