************************************** * * * Applier 1.0 * * by John Eidsvoog * * Copyright 1993 John Eidsvoog * * * ************************************** Release date: Thursday, January 7, 1993 > Applier 1.0 is freeware and may be distributed freely as long as > this text file is included. It may not be sold commercially or > included with a commercial product without written permission from > John Eidsvoog. What it is ---------- Applier increases the power and flexibility of the installed application feature of Atari computers. This feature allows you to configure your system so that you can start an application by selecting a document, which will in turn be loaded by the application. But it only lets you define one application to be called for any particular document type (file extension). Applier enhances the installed application process in two ways. First of all, it allows you to install more than one application for a single file extension. Up to eight different applications can be invoked for each extension. Secondly, Applier allows you to include commands on the command line along with the document's filename. This also means you can call the same application in different ways. In layman's terms, Applier allows you to do such things as obtain a listing of an archive's contents by double-clicking on it while holding the Left Shift key, and then extract the files by double-clicking on it while holding the Alternate key, without the use of an archive shell. The power of Applier can also be applied to far more involved concepts. The limits are imposed only by the applications you use and your imagination. If this all sounds a bit complicated to you, don't despair yet. Make sure you read the section below called "What is a Command Line?". It may give you the courage to work your way through the rest of this documentation and make use of the power of Applier. How to set it up ---------------- To set up Applier, you'll need to create a text file called APPLIER.DAT. This is described in detail below. Applier looks in a lot of different places for its DAT file in order for you to use more flexibility in defining your default directory (see NOTE below). First the default (current) directory is searched, next the root of the current drive, then the root of your boot drive, and finally drive A. If you've got TOS 2.0 or later, you can place APPLIER.DAT in the root of your boot drive and install Applier as an application with "Top Window" as the default directory. You'll then need to install APPLIER.PRG as an application for each document type (extension) you wish to use. If you're using HotWire and MaxiFile, this is very easy to do. You should install APPLIER.PRG in the HotWire menu (or your Global Block) and you can enter up to four different file extensions in the "Documents" line (of the program's Options Box). If you need more than 4, you can just install APPLIER.PRG in another slot to get another 4. If you're using the GEM desktop, there are two different ways you can install APPLIER.PRG for more than one document type. One way is to make a number of copies of Applier with different names (APPLIER1.PRG, APPLIER2.PRG, etc.) and install each one as a different document type. But a more elegant method is to install APPLIER.PRG once for the first document type and save your desktop. You can then edit your DESKTOP.INF (or NEWDESK.INF) file to add the other document types. If you first install APPLIER.PRG as an ARC application, load your INF file into a text editor and you'll find a line something like this: #G 03 04 300 C:\APPLIER.PRG@ *.ARC@ @ To add additional extensions, simply make copies of this line and modify the extension: #G 03 04 300 C:\APPLIER.PRG@ *.ARC@ @ #G 03 04 300 C:\APPLIER.PRG@ *.LZH@ @ #G 03 04 300 C:\APPLIER.PRG@ *.ZOO@ @ #G 03 04 300 C:\APPLIER.PRG@ *.CCP@ @ If you're using an early version of TOS, you may not see a full path for the Applier program. You can add the rest of the path to make sure Applier will be found. Don't forget to save your altered INF file (as DESKTOP.INF or NEWDESK.INF). If you're using TOS 2.06, you can use the "Read INF File..." feature to put it into effect. Otherwise, you'll need to reboot for the new entries to take effect. To install APPLIER.PRG as an application in another shell, refer to the documentation included with the shell. NOTE: If you're using TOS 2.0 or later, you can choose to set the default directory to "Application" or "Top Window" when you install an application. This is a handy feature because some programs (such as archivers) will use the default (current) directory to create its files. If you select "Top Window", files will be probably be extracted to the same directory as the archive document. How it works ------------ Once Applier is installed correctly, you'll be able to double-click on documents while holding any combination of the Control, LeftShift, and Alternate keys to initiate different tasks depending on the command lines you've defined in your DAT file. There are eight different combinations of the shift keys that can be used: 1. Control 2. Left Shift 3. Alternate 4. Control/Left Shift 5. Control/Alternate 6. Left Shift/Alternate 7. Control/Left Shift/Alternate 8. None The Right Shift key is not used, as it is assumed your right hand will be busy with the mouse. (If you have the G+Plus accessory installed you'll find that the use of Alternate or Control/LeftShift may get in the way unless you disable the "Watch Alt" button in the G+Plus accessory.) When you double-click on a document which has been installed for Applier, Applier will run and load its DAT file. It will then search the DAT file to see if the extension you selected is defined there. It will then try to find a match for the shift key combination which you are holding down. NOTE: If you are using a floppy disk, you'll have to make sure you hold down the shift key combination long enough for Applier to load. Hard disk users will probably not have a problem, but should be aware that the shift keys have to be held down long enough for Applier to load. If Applier finds a matching extension and shift combination, it will run the program listed in that line, passing it the command line listed after the program (if there is one). The command line may contain a tilda (~) character. Applier will replace the tilda character with the full pathname of the document file upon which you clicked. If Applier finds a matching extension but no matching shift combination, it will run the program listed in the last matching line and pass it the name of the document (omitting the rest of the command line, if present), as is normally done when an application is started. The Applier DAT file -------------------- Here's a sample APPLIER.DAT file: ARC sw C:\UTILITY\ARC602.TTP v ~ ARC aw C:\UTILITY\ARC602.TTP x ~ LZH w C:\UTILITY\LZH201I.TTP v ~ LZH aw C:\UTILITY\LZH201I.TTP x ~ zoo x c:\utility\zoo.ttp v ~ ZOO a C:\UTILITY\ZOO.TTP x ~ CCP x C:\UTILITY\CODE_RAM.PRG -n-dp-is-l2"~" ------------------------------ APPLIER.DAT is simply an ASCII text file. You can use any text editor or most any word processor to create it. The requirements are as follows: 1. Only the first 50 lines will be used. 2. Each line must begin with a file extension 3. A _single_ space must separate each element of a line. 4. Each line must contain an extension, a set of shift key codes, an application name, and optionally a command line. 5. All lines must end with a carriage return (ASCII 13). 6. Characters may be upper or lower case. Extensions and filenames will be forced to upper case before being used. Command lines will be passed to the program unaltered. The elements of a line in the APPLIER.DAT file are defined as follows: Extension - The extension must start at the beginning of the line and be terminated by a single space. It may be 1, 2, or 3 characters in length. Shift Key Combination - This element describes the combination of shift keys which are defined for this line. These characters may be in upper or lower case, may be in any order, and are defined as follows: C - Control S - Left Shift A - Alternate X - No shift keys. Use "X" (or any other character but C, S, or A) as a place-holder if you want to specify no shift keys. If you use "W" for wait as the only shift key character, it will serve the same purpose. W - Wait (this is not really a shift key, but may be added if you'd like Applier to wait for a keypress (or mouse button) after the application has finished running, allowing you to read any messages it may have displayed on the screen. Application Name - This is the full pathname of the program which will be started if a match of the extension is found. If the name does not exist, Applier will inform you with an error message. Command Line - Following the application name and a single space is an optional command line. The command line may contain spaces. Everything up to the end of the line will be assumed to be part of the command line. The tilda character (~) is used to denote the document's file name. Applier will replace the tilda with the full pathname of the document you used to invoke Applier. If no command line is defined, the full pathname of the document will be used. In the sample APPLIER.DAT file at the beginning of this section, the first entry will produce a verbose listing of any ARC file upon which you double-click while holding the Left Shift key. The text will remain on the screen until you hit a key or press a mouse button. The second entry will extract an ARC file if you hold Alternate. Similar entries are listed for LZH and ZOO file types. The last entry will create a RAM disk P, sized to fit the CodeCopy disk image file (CCP) that you double-click on. Note that the 3rd, 5th, and 7th lines have no shift keys defined. As you can see, you'll need to refer to the documentation for your applications in order to construct your command lines correctly. What is a Command Line? ----------------------- The concept used by Applier (calling programs with command lines) may be a little hard for the average user to grasp. Command lines offer a lot of power to the user and to the programmer but unfortunately the use of command lines is anything but intuitive, especially to those who use graphical interfaces for all of their computer needs. Basically, a command line allows you to have "command" over a program. You supply the program with a string of characters which define what you'd like it to do. When the program is started up, the shell (desktop or menu program that's running the program) takes the command line and places it in a spot where the program can look at it. Not all programs look at their command lines, so you can't expect miracles to happen. If a program is a TTP, you can be assured that it can be controlled by a command line. TTP stands for Tos Takes Parameters, where the parameters are the elements of the command line. But a program doesn't have to be a TTP in order to be controlled by a command line. The most common usage of the command line among other types of programs is to define a data file to be automatically loaded. This is accomplished by installing an application for certain document types (file extensions). Again, not every application will look at its command line for a filename to load. The only way to know for sure is to try it. When you install an application, it will _always_ run when the associated document is started (because you've told the shell to do it). But it may simply ignore the command line and act the same as if you'd started it directly. Any application which is programmed to do so will load the file it finds on its command line. Here are some applications which do load documents when installed as applications, and the normal extension type(s) they expect. It is by no means a complete list: ArcShell ARC LZH GFA Basic GFA (BAS) LookIt * (any file) Word Writer DOC LoadKeys KEY Flash DO Desk Switch INF Calamus CDK Calligrapher CAL LDW Power LDW Art Gallery PI? PC? TNY SPC Easy Draw GEM ART NEO PNT Phasar CFG Call ED PicSwitch Hot Editor HOT HBL D-Slide Desk Manager PRE Tempus HotWire HOT WRK Resource Const.Set RSC Avant Vector CVG IMG GEM MultiDesk ACC MLT MIDI Spy MID MST MSQ RSC to ASM H To install an application on the GEM desktop, you click once upon it and select "Install Application" from the menubar. A dialog box will appear, allowing you to enter the file extension for the type of document you'd like to use to start the application. You must then be sure to save your desktop ("Save Desktop"). This will make an entry in your DESKTOP.INF (or NEWDESK.INF) file which will tell the desktop to run that application when you "start up" that type of file, passing the document's filename on the command line for you. With earlier versions of TOS, the only way to "start" a document is to double-click on the file (or use "Open" in the menubar). But if you have TOS 2.0 or later, you can also start a document by dragging the filename or icon to the application you wish to run. You could use this method to start Applier (drag files to APPLIER.PRG) without installing it as an application. See your computer manual for more details about installing applications. If you use HotWire, you have more power when installing applications because you can enter up to four different document types for each HotWire entry, plus you can install the same application in as many slots as you like, making it virtually impossible to run out of installable document types. The document types are entered into the Program Options box in any of the four areas after the word "Documents:". HotWire also offers a number of ways to start documents. You can install any document file directly into the HotWire menu. Or you can right-click on the "Running Man", or select "Start a Document..." from the menu bar, or press Control-F7 to bring up a file selector, allowing you to select a document. Finally, if you use MaxiFile in conjunction with HotWire and you've entered MaxiFile by pressing F10 or clicking on the MaxiFile icon, you can double-click on any document in the MaxiFile source or destination window to start it up. MaxiFile will pass the filename back to HotWire and HotWire will take it from there, searching its HOT file and global block for an installed application matching the document's extension, and running the application if it finds a match. So where does Applier fit into all of this? Well, it gives you more flexibility and power. When you start an application from a document, the application normally receives only the document's filename on the command line, and only one application may be defined for a single document type (as opposed to defining multiple document types for a single application). Applier expands all of this. It allows you to invoke more than one application from one document type, or to invoke the same application with different commands on the command line. When you start a document for which you've installed Applier, the desktop (or your shell) will run Applier with the document's name on the command line. Applier then takes over and passes the document name on to another application based on what is defined in your APPLIER.DAT file and which shift keys you're depressing. Copyright stuff --------------- APPLIER.PRG, and this document are Copyright 1993 John Eidsvoog. Applier 1.0 is freeware and may be freely distributed as long as neither this document file (APPLIER.TXT) nor the program file (APPLIER.PRG) are altered in any way. Copies of these files may not be sold, and this document may not be reprinted, without the express written permission of John Eidsvoog. I've tried to make Applier as bug-free as possible. Nevertheless, I cannot be responsible for any damages which may occur as a result of the use (or misuse) of Applier. Please accept Applier 1.0 as a gift and use it in good health. Please also support shareware authors by paying for those shareware programs that you use. Thank you for your support. - John Eidsvoog ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~