home *** CD-ROM | disk | FTP | other *** search
- /* CDO for Directory Opus 5 by Leo 'Nudel' Davidson
- by Leo 'Nudel' Davidson for Gods'Gift Utilities
- email: leo.davidson@keble.oxford.ac.uk www: http://users.ox.ac.uk/~kebl0364
-
- $VER: CDO.dopus5 1.3 (18.8.95)
-
- Note: Please don't confuse this with the OCD script!
- Note: "CDOpus" is an assembler version of this script, with extra features.
-
- When run from a Shell, will echo the path used by the SOURCE Lister.
- Using an alias, this can be used as a command which CD's to the path
- used by the SOURCE lister.
-
- To set up the command "CDO", add the following to your s:shell-startup:
- -------------------------------------------------------------------------------
- Alias CDO "CD *"*`rx DOpus5:ARexx/cdo.dopus5*`*""
- -------------------------------------------------------------------------------
-
- v1.01 -> v1.02 - Now makes sure there is a source lister. (Ahem)
- Now makes sure the DOPUS.1 port exists. (Double-Ahem)
- v1.02 -> v1.3 - Now uses Show() instead of ShowList(). (Thanks Stoebi)
- Style Guide compliant version numbering and $VER string.
- */
-
- options results
- options FAILAT 99
- signal on syntax;signal on ioerr
-
- If Show("P","DOPUS.1") Then
- address "DOPUS.1" /* Assumes there's only one copy. */
- Else
- Exit /* If no DOPUS.1 port, exit */
-
- lister query source stem source_handle. /* Get handle of SOURCE lister(s). */
-
- IF source_handle.count = 0 | source_handle.count = "SOURCE_HANDLE.COUNT" Then Do
- dopus front
- dopus request '"You must have a SOURCE lister!" OK'
- EXIT
- End
-
- Lister Query source_handle.0 Path /* Get its path. */
- Say Strip(RESULT,B,'"') /* Echo result -> input of CD cmd. */
- Syntax:;IoErr:
- EXIT
-