home *** CD-ROM | disk | FTP | other *** search
-
- SelectDoc v1.0, by Stan Ziel
- ----------------------------
-
- OVERVIEW
- --------
- SelectDoc is an add-on utility (tool) for TurboText, which presents
- you with a list of documents. Using a GUI and scrolling list, you can
- choose a document, which will be brought to the front of the screen
- and made active. SelectDoc will only run under version 2.0 or greater
- of AmigaDOS.
-
- SelectDoc is freely redistributable.
-
- TurboText is Copyright © 1990,1991 by Martin Taillefer.
-
-
- INSTALLATION
- ------------
- Simply copy SelectDoc to a suitable place on your system. One
- likely place is wherever you have TurboText: assigned. Once this is
- done, you will want to add a command to your TTX_Startup.dfn file that
- will run SelectDoc. This will use the ExecTool command of TurboText to
- start SelectDoc. Starting SelectDoc every time you start TurboText is
- left as an experiment to the reader. :-)
-
- SelectDoc is not "pure" nor can it be made resident. However, since
- you can only have one copy of TurboText, this should not be a problem.
- If SelectDoc sees that it is already running, it will just open the
- current SelectDoc window. This allows you to use the same command that
- starts SelectDoc to also activate SelectDoc.
-
- SelectDoc does not "detach", and thus will not return control to
- TurboText once it is started. This is useful if you want to use
- SelectDoc as a "one-shot" utility. But if you want to start SelectDoc
- and then continue with TurboText, you can "run" SelectDoc to do this.
-
- An example menu item to start SelectDoc would be:
-
- ITEM "Select Doc..." "" ExecTool SCREEN
- "run <nil: >nil: TurboText:SelectDoc BG"
-
- Note: The line is broken in half just so that it will fit here.
- This line would go in your TTX_Startup.dfn file, and would install a
- menu item that starts SelectDoc in background mode. This allows it to
- hang around after the selection, and thus we use "run". The SCREEN
- argument must be used after ExecTool! SelectDoc will not run if this is
- missing. This menu item will also activate SelectDoc if it is already
- running.
-
-
- COMMAND-LINE OPTIONS
- --------------------
- SelectDoc uses a standard CLI-Template for the options passed to it.
- However, typing "SelectDoc ?" will not do anything, so you'll need to
- read about them here. The SCREEN option is mandatory, and is passed
- from TurboText when you use "ExecTool SCREEN" to start SelectDoc. The
- full Template is:
-
- BG=BACKGROUND/S,ICON=ICONIFIED/S,LEFT/N/K,TOP/N/K,SCREEN/A
-
- BG - This option tells SelectDoc to hang around after you make
- a selection. SelectDoc will quit, though, if you use the
- close gadget, or send an ARexx command telling it to quit.
-
- ICON - This option is used to start SelectDoc in its iconified
- mode. This is a small window that is less obtrusive, so
- is handy when you keep SelectDoc in background mode.
-
- LEFT n - When you use the "LEFT" keyword along with a numeric
- argument, you specify the starting left-edge for the
- SelectDoc windows. If you specify a value that would put
- the windows off the screen, the windows are opened with
- the maximum possible left-edge.
-
- TOP n - Like the LEFT option, but this value specifies the
- top-edge to use. Again, this value will be adjusted if it
- isn't valid for the screen dimensions.
-
- If SelectDoc is already running, all options are ignored.
-
-
- INTERFACE
- ---------
- SelectDoc's interface is fairly straight-forward, and follows (for
- the most part) the 2.0 style. You can drag the window around, and zoom
- between Iconified and Full-Sized windows.
-
- The close gadget will terminate SelectDoc regardless even if you
- specified "BG" on the command line.
-
- When SelectDoc is full-sized, you will see a list of documents, plus
- three buttons. The list can be scrolled if there are more documents
- than will fit. The buttons all have keyboard shortcuts, which are
- specified by the underline. (You don't need to use any special keys
- with the keyboard shortcuts.)
-
- To choose a document, click and it once, and choose "OK", or just
- double-click on the name of the document. If, for some reason, the
- document is not found, or you have not picked one yet, the screen will
- flash, and you can try again.
-
- Choosing Cancel will end the process without selecting a document.
- Note that OK and Cancel both respect the BackGround setting. If you
- started SelectDoc with the BG option, they will iconify the window.
- Otherwise, SelectDoc will terminate.
-
- Update List is used for those times when SelectDoc's list doesn't
- keep up with the documents you really have in TurboText. This can
- happen, for example, when the SelectDoc window is full-sized, and you
- open or close a document. When this happens, you can update the list.
- The list is always updated when the SelectDoc window de-iconifies, and
- when you choose a non-existant document.
-
- Note: The list shows "<no name>" for documents that have not yet
- been named (or might be empty.) This makes it easier to distinguish
- these documents from empty spots on the list.
-
-
- AREXX
- -----
- SelectDoc also accepts some ARexx commands. This allows you to have
- additional control from TurboText menus and keyboard commands. (Or any
- place else that speaks ARexx.)
-
- SelectDoc's ARexx port is called "TTX_SD_PORT". It is in upper-case
- to make it easier to deal with in ARexx. One example of using the ARexx
- interface would be to add a keyboard command to toggle the Iconify-state
- of the window from within TurboText. Thus:
-
- CTRL-D ExecARexxString "address TTX_SD_PORT TOGGLE"
-
- You might want to be sure that the port exists first. But if you
- don't, and the port isn't found, you'll just get an error message to
- that extent; no harm done.
-
- The ARexx commands understood by SelectDoc are:
-
- TOGGLE - Toggle the window's Iconified state.
-
- QUIT - Tells SelectDoc to terminate, regardless of BackGround
- mode.
-
- UPDATE - Forces SelectDoc to update it's list of documents.
-
- CANCEL - This Iconifies the window (if it isn't already.) If
- SelectDoc is not running in BackGround mode, then the
- program will be terminated. "CANCEL" was chosen since
- it is the same as the Cancel gadget.
-
- UNZOOMWINDOW - This will expand SelectDoc's window to full-sized,
- and update the list of documents. As mentioned
- before, running SelectDoc a second time has the same
- effect.
-
-
- NOTES
- -----
- SelectDoc was done because the GUI RexxArpLib version I first
- attempted was too awkward. It was also done so that I could finally
- write a "real" 2.0 program. As such, it uses many of the new 2.0
- enhancements, such as ReadArgs(), GadTools, public screens, and so on.
- I've also tried to keep close to the 2.0 and TurboText's look, as well
- as the new interface guidelines from Commodore.
-
- SelectDoc was written in SAS/C on a 3000, using the Ed text editor.
- (Just kidding... of course I used TurboText! :-)
-
- Thanks to:
- - Martin Taillefer for TurboText and answering my questions about it.
- - David Junod for helping me get the keys to "work" their gadgets.
-
- - And, as always, Kate Bush for singing to me while I worked, and while
- I didn't.
-
-
- You can reach me via:
-
- Phone: 914-639-5001 (voice), BIX: sizel, DevCon 91: I hope
-
-
-