PART 3: Secrets of NeoDesk 4 - by Al Fasoldt
Applying the Principles
16 July, 2019 by
PART 3: Secrets of NeoDesk 4 - by Al Fasoldt
| No comments yet

                                                          PART 3: APPLYING THE PRINCIPLES

                                                          Let the desktop do the work for you

                                                          When Apple introduced the Macintosh 11 years ago, personal computing suddenly became easier. Much of this was a result of the Mac's windows and icons and the simple way that it could be made to copy and move files or even entire subdirectories -- or folders, in a lexicon that soon became popular on other platforms. But more than anything else, the Mac was easy to use because its operating system associated data files with applications. Generally, a Mac user never has to run a program directly; all that's necessary is to double-click on a data file, and the rest is handled by the Mac.

                                                          On the Mac, all applications -- computer jargon for programs of any kind -- work this way, and so there is no such thing as an "installed application." Apple works with software developers to assign data types and icons to all new software, so that applications install themselves, so to speak.

                                                          The ST, TT and Falcon work the same way, except that applications must be installed by the user. Here, in its basics, is how the process works:

                                                          Let's suppose that you are using LHARC.TTP as your standard software for extracting archived files that have the ".LZH" filename extension. One way to use this utility would be to double-click on its icon or filename from the desktop and then fill in the "parameters" box that appears when it runs. (As a "TOS-Takes-Parameters" program, it requires command-line instructions when it is invoked.) A typical set of parameters for LHARC.TTP might be "x FILENAME.LZH" to extract all the files from the archive named FILENAME.LZH.

                                                          But LHARC.TTP is specially written to accept just the filename itself as a parameter. You could, of course, run it from the desktop and type in the filename of the archive, but there's a much easier way -- by associating a filename extension when you install each program in the GEM desktop's "Options" menu. (You must save the desktop to make the change permanent, of course.) Then, all you need to do is to double-click on the archive's icon or filename; the archiving utility automatically runs and extracts the files.

                                                          Here's another example, which is perhaps just as common. Suppose your favorite word processor is Atari Works. This application generally saves its texts with an ".STW" filename extension. If you want to edit or read an Atari Works document, one way to do it is to open up the folder where Atari Works is located, double-click on the Atari Works icon or filename, and then select the document you want to edit or read from the file selector that appears.

                                                          But that's just plain dumb. (I'm not referring to your intelligence, of course, but to the mindless way the computer would be operating in that situation.) The sensible way is to install Atari Works in NeoDesk 4 with ".STW" as its associated filename extension. Then any time you click on a file that has ".STW" as its extension, Atari Works will automatically run and load the text.

                                                          (Those of you who use this feature of GEM on a regular basis will have to bear with me for a while, since I'm convinced that only a small fraction of Atari users know about installed applications. I hope I'm wrong!)

                                                          This method of associating data files with applications does not work with all programs, but it operates with most of the ones that are written properly. It's important to note that some applications may require specific filename extensions, but others, such as text editors, usually have no restrictions.

                                                          To link applications with their data types -- filename extensions, in other words -- within NeoDesk 4, click once on the icon or filename of the application and drop down the "Options" menu. (You'll find an "Options" menu in each desktop window and in the main NeoDesk GEM menu bar.) Choose "Install Application" and type in the filename extension you want to associate with the program. You'll notice that the dialog also lets you set other parameters, and it also allows you to scroll through the full list of currently installed applications if you want to change any of their settings.

                                                          NeoDesk 4 lets you specify two data types (filename extensions) for each application. You can add more extensions by editing the NeoDesk information file -- a simple procedure, but one that could cause a disaster if you fail to heed the next two warnings:

                                                          1. Work on a backup copy of the information file, not an original copy.

                                                          2. Edit the file with a text editor or word processor that has word-wrap turned off and that can save its output in standard ASCII form. (An ASCII file is just text, with no word-processing codes.) STeno, EditPlus, Everest, SpiritEd, Edith, and the editors built into Flash, Flash II and Storm all meet this ASCII criterion. If you use a full word processor for this kind of editing, you're asking for trouble unless you make sure word-wrap is off and the text is saved as ASCII. If you're not sure if your word processor can do that, don't even try. (Buy a copy of STeno or EditPlus instead.)

                                                          The information file is usually named NEODESKn.INF, with the "n" representing the resolution. A typical information file for ST high resolution would be named NEODESKH.INF. It is easy to decipher. You will see a section that begins with a line that looks like this:

                                                              ;Applications: type,flags,2 extensions,name,path
                                                          If you have not yet installed any applications, the entire section will be blank. Otherwise you will see each application listed in one line. Here is one for Calligrapher:

                                                              APPLIC 152 1F `.CAL` `.CAT` `CAL.PRG` `D:\WORDPROC\CAL\`
                                                          Calligrapher should not need more than two file extensions associated with it (".CAL" for Calligrapher documents and ".CAT" for Calligrapher templates, which cannot be saved until you rename them). But a program that can make good use of multiple file associations is STeno. What I am about to show you may be unfamiliar, so look it over carefully.

                                                          First, note the name of the application -- STENO2.PRG instead of STENO.PRG. On both my systems, I have many variations of STeno -- two STeno desk accessories and three STeno programs. The ones with "2" in their names are set up strictly as programmers' editors, with word wrap turned off and the default window set quite wide. I use these versions of STeno whenever I need to edit a data file. I work at the desktop extensively, and that means I am nearly always dealing with files and folders -- not applications. Why should I have to run a text editor manually when I want to edit a text or ASCII data file? It's much easier to double-click on the file. Entering lines like these in your NeoDesk 4 information file makes that possible:

                                                          APPLIC 152 1F `.TXT` `.ME` `STENO2.PRG` `C:\SYSTEM\`
                                                          APPLIC 152 1F `.SYS` `.SYX` `STENO2.PRG` `C:\SYSTEM\`
                                                          APPLIC 152 1F `.INF` `.INX` `STENO2.PRG` `C:\SYSTEM\`
                                                          APPLIC 152 1F `.CFG` `.CFX` `STENO2.PRG` `C:\SYSTEM\`
                                                          APPLIC 152 1F `.DAT` `.DAX` `STENO2.PRG` `C:\SYSTEM\`
                                                          Look at the extensions for STENO2.PRG. You'll see ".TXT," of course, but you'll also see ".SYS" and others that are usually not considered as texts. But in many cases, they ARE texts -- with ASSIGN.SYS being the most prominent example. Note also that I also list these extensions ending in "X," is in ".SYX" and ".DAX." This allows me to double-click on a data file that is, in effect, turned off (hidden from its application through the renaming process) and still edit it via STeno.

                                                          Note that under a multitasking environment, the same copy of a properly written application can be running in multiple instances at the same time. This makes multiple associations even more powerful.

                                                          INFinite wisdom

                                                          Within the NeoDesk information file itself, or (preferably) within NeoDesk's "Set Preferences" menu (under the "Options" drop-down menu), you can add to the list of executable file types or change the ones that are already listed. Normally, the only executable file types are those that end in these extensions: .APP, .PRG, .TOS, .TTP and .GTP, in addition to the special NeoDesk-compliant applications, which have the extensions .NPG and .NTP, and NeoDesk 4's program information files, which end in .NPI.

                                                          The extensions have these meanings:

                                                          .APP - Application
                                                          .PRG - Program

                                                          (Applications and programs are usually the same thing. They are standard GEM programs, although they do not need to have GEM windows. Some programmers stick to the rules, and use .APP only to refer to programs that can also run as desk accessories if you change their extension to .ACC.)

                                                          .TOS - "The Operating System" program, which does not make use of the GEM desktop built into the operating system, and does not ordinarily provide access to desk accessories.

                                                          .TTP - "TOS-Takes-Parameters" program, a TOS program that normally requires command-line input from the keyboard, from another program or from any other source. A common .TTP program is ARC.TTP, and a common parameter for ARC.TTP is an archiving command followed by the path and name of the archive. (Example: ARC.TTP X MYFILE.ARC, which tells ARC.TTP to extract the files in the archive named MYFILE.ARC.)

                                                          .GTP - "GEM-Takes-Parameters" application, an .APP or .PRG that behaves like a .TTP file in some ways.

                                                          .NPG - "NeoDesk Program," a specially written .APP or .PRG that communicates with NeoDesk. There are only a few .NPG applications.

                                                          .NTP - "NeoDesk-Takes-Parameters," an .NPG program that accepts command-line input.

                                                          .NPI - "NeoDesk Program Information" file, a set of instructions that NeoDesk passes to a program that is being run. These are described separately in this guide.

                                                          If you are using Geneva, you should add other extensions to this list. They are .PRX and .ACX, which represent executable files that are "turned off" so that they cannot be run at bootup. If you are really fastidious, add ".APX" also.

                                                          A small digression is in order to help explain this X-rated business. All modern Atari computers ordinarily use two disk locations to determine which executable files are run when the computer boots up. The first is the boot drive's AUTO folder and the second is the boot drive's root (main) directory. All .PRG and .APP files found in the AUTO folder are run at bootup, and the first six .ACC files found in the root directory are initialized.

                                                          You may know already that Geneva eliminates the vexing limitation on the number of .ACC files that are loaded at bootup. (There is no practical limit.) And you may know that Geneva is able to run these desk accessories even if they are renamed with an .ACX extension. Likewise, if its configuration is set accordingly, Geneva is able to run programs that have a .PRX or .APX extension. NeoDesk 4 can do the same thing.

                                                          But Geneva and NeoDesk will not do this at bootup time. This means you can hide files from the autorun routines by renaming them with an "X" as the last character of the filename extension even if Geneva and NeoDesk 4 have those files listed as executable. They will still be executable, but only after the regular part of the bootup has finished. (.PRX and .ACX files can be run by Geneva from "run" or "runacc" statements in its GEM.CNF file after the regular part of the bootup has finished, but they will be ignored in the AUTO folder or in the desk accessory path otherwise.)

                                                          By listing .PRX, .APX and .ACX files as executable under NeoDesk (and Geneva), you provide a way of running these programs at any point after bootup -- even if the .PRX files are in the auto folder. (Yes, you can often run an AUTO-folder program after bootup without a problem.)

                                                          NeoDesk has another category of executable files. These are batch files, which technically are executable only in the sense that they are scripts for a batch-file interpreter. CLIs (command-line interpreters) usually include the ability to run batch files, as do such shell programs as Gulam and TomShell. Two types of batch file can be installed in NeoDesk 4: .BAT (a standard batch file) and .BTP ("Batch-Takes-Parameters"), a NeoDesk-specific batch file run by the NeoDesk CLI desk accessory. Installing the extensions .BAT and .BTP in the NeoDesk information file tells NeoDesk to run the CLI or shell of your choice, feeding the batch file to the CLI or shell for immediate execution any time you click on a filename or icon with either of those extensions.

                                                          You must first list the path and name of the CLI or shell in the "Paths" submenu under the "Settings" menu. If you do that, NeoDesk 4 offers a keyboard shortcut to run your CLI or shell. This is Control-B. This shortcut will not work if you have not installed the CLI or shell in the "Paths" entry line.

                                                          Sign in to leave a comment