The Little Green Selector ------------------------- Shareware by Charles F. Johnson Copyright 1989 Little Green Footballs Software All Rights Reserved. Version 1.1 Release Date: July 14, 1989 The Little Green Selector is a complete replacement for the dreaded GEM item selector. Once it's installed, all programs that call the GEM item selector will end up using the vastly improved Little Green Selector instead. You can install it at bootup time by placing it in an AUTO folder, or run it from the desktop at any time after bootup. The Little Green Selector (henceforth referred to as LGSELECT) doesn't copy files, and it doesn't format a disk; but it DOES optimize the process of selecting files. You'll find some unique features in LGSELECT that will make this easier than ever before. Shareware - a concept before its time? -------------------------------------- The Little Green Selector is being distributed as "shareware." This means that you're free to give copies of it to friends, to upload it to bulletin board services, etc., as long as both LGSELECT.PRG and this document (LGSELECT.TXT) are included and neither file is altered in ANY WAY. However, if you use and enjoy this program, you are expected to pay for it just as you would be expected to pay for a commercial program. I'm asking a contribution of only $15.00, so it's pretty painless to become a registered user of the Little Green Selector. If you do find LGSELECT useful, please send a check or money order for $15.00 to: Charles F. Johnson (LG Selector) P.O. Box 1250 Pacific Palisades, CA 90272 I've released two previous programs as shareware (ARC Shell and Desk Manager), and I'll be honest with you - the response has been less than overwhelming. And I've been pretty lucky; I've spoken to other shareware authors about this, and most of their experiences have been even more dismal than mine. Programs don't come into existence spontaneously - the people who design them spend many many hours thinking about, planning, testing, and revising their work (not to mention the years spent refining techniques and learning to use the tools). It takes a leap of faith for programmers to release the fruits of their labor into free distribution, relying on the "honor system" to see some reward for their creations. I know it takes a little extra effort to write out a check and drop it in the mail, but the fact is that only you, the user, can make the 'shareware' idea work. If you'd like to see more programs distributed as shareware, you have to do your best to support the programs you use. (By the way, I want to say a sincere "thank you" to everyone who has contributed for ARC Shell and/or Desk Manager, lest you think I've forgotten. I haven't, and your contributions are very much appreciated.) Anyway...end of sermon. On with the show. Installing LGSELECT. -------------------- LGSELECT is very simple to install. You can either run it from the desktop by double-clicking on its icon or filename, or place it in an AUTO folder so that it installs automatically at bootup time. To install LGSELECT automatically, just copy it into a folder named AUTO on your boot disk. If you don't already have an AUTO folder, you can create one from the GEM desktop by using the 'New Folder' option in the 'File' drop-down menu. If you do already use an AUTO folder with several programs in it, LGSELECT can simply be copied into the existing folder. After placing LGSELECT.PRG in your AUTO folder, reboot your computer. During the bootup process, you'll see a message from LGSELECT, and it will be automatically installed. (NOTE: LGSELECT can run at any point during the AUTO programs; however, there may be some improperly written AUTO programs that need to run before or after LGSELECT. If you have a conflict, you should begin by removing everything from your AUTO folder except LGSELECT, then start adding the other programs one at a time until you find the source of the trouble. Often, you can fix incompatibilities simply by changing the order that you copy programs into the AUTO folder. Remember that AUTO programs run in the order in which they appear in a disk's directory [not alphabetically, nor by time/date stamp] -- if you're not sure about the order, you can use LGSELECT's 'No Sort' feature [see below] to show the true arrangement.) If you run LGSELECT from the desktop, a GEM alert box will appear. You can click on the button labeled 'Install' to make LGSELECT resident, or on 'Cancel' if you change your mind. Using LGSELECT. --------------- In addition to the extra features it provides, LGSELECT incorporates all of the functions of the standard GEM item selector and provides a similar interface; so if you know how to use the GEM selector you should have no trouble getting accustomed to LGSELECT. For this reason, I'm going to assume in the following discussion that you already know how to perform basic operations with the GEM selector. (If you're unsure about how to operate the GEM selector, please refer to your ST owner's manual.) LGSELECT uses both mouse buttons. In many cases, an option will behave differently depending on which mouse button you use when you select it; so it's a good idea to read this documentation through before using LGSELECT so you won't be surprised. To get your first look at LGSELECT, run some program that uses the item selector. When LGSELECT appears, the first thing you'll notice is that it's larger than the GEM item selector. The GEM selector only shows you 9 files at once; LGSELECT displays 16, so you can see more of a directory at a glance. You'll also notice that there are quite a few more controls and buttons in the LGSELECT dialog box; I'll explain the use of those controls now. The Drive Buttons. ------------------ On the right side of the box underneath the 'OK' and 'CANCEL' buttons are 16 drive buttons labeled A through P. To change to a new drive with LGSELECT, all you have to do is click on one of the drive buttons; no more editing the directory line! Only active drives are selectable - drives that don't exist on your system are shown as "disabled". When you change to a different drive by clicking one of these buttons, LGSELECT will determine the current directory for that drive and display its contents. The drive buttons are also used to display the amount of free space (in bytes) remaining on a disk. There are two ways to show a disk's free space - you can either double-click the drive button (with the left mouse button), or single-click it with the right mouse button. After a short delay to read the information from the disk, an alert box will appear showing the number of bytes left. Another important feature of the drive buttons - you can force a "media changed" status on any drive by holding down Alternate, Control, or either Shift key while you click on the drive's button. This is very useful for people with removable media (like the Syquest drives or the Konica 10M floppy) that sometimes don't properly respond when you change the disk (or cartridge). It's also for handy for those who have floppy drives that don't always recognize when you change a disk. The Sort Buttons. ----------------- Under the drive buttons are the buttons that represent the different sorting options that LGSELECT offers. You can choose to sort the displayed files by Name, Extension, Size or Date, or you can display them unsorted if you wish. To select a new sorting method, just click on its button and the files in the current directory will be resorted and redisplayed in the new order. The Info Button. ---------------- Click on the button labeled 'Info' to show the version number of LGSELECT. *.* (Show All Files) -------------------- Click on the button labeled '*.*' to show all files in the current directory. When you select this button, the current directory search specification will be copied into the button, and the search spec will be changed to '*.*'. You can return to the original search spec simply by clicking the button again. The Paths Button. ----------------- The button labeled 'Paths' gives you access to one of LGSELECT's nicest features. Click on 'Paths' and a dialog box appears, showing 18 blank lines and a list of 20 default extensions, as well as several buttons for additional options. In the Paths box, you can set up as many as 18 default paths; clicking on any path will instantly set it as the current directory, and return you to the main LGSELECT box. (This can make navigating on a hard disk very simple!) To install paths into the list, simply hold down Alternate, Control or either Shift key while you click on the 'Paths' button in the main LGSELECT box. The current directory will be copied into the first empty slot in the path list. The 'Paths' dialog box itself will not appear when you're installing paths, so that you can quickly set up a group of different paths. If you use up all 18 slots and try to install another path, an alert box will appear; at this point you can either 'Cancel' installing the path or 'Replace' the last (18th) entry in the list with the current directory. If you click on 'Paths' without holding down Alt, Ctrl, or Shift, the 'Paths' dialog box appears. You can instantly set the current directory to any path in the list by clicking on it with the left mouse button. This will return you to the main LGSELECT box, and the files in the new path will be displayed. You can delete any single path from the list by clicking on it with the right mouse button. An alert box will appear, asking you to confirm the delete. At the bottom left of the 'Paths' box is a list of 20 extensions (or file "types") which can be edited with the keyboard. Use the up and down arrows to move the cursor through the list, and Esc to clear an extension. When you click on one of the extensions with the left mouse button, the directory line in the main LGSELECT box is changed to the new extension. This lets you easily display only certain types of files. When LGSELECT is first installed, the extensions are preset to a group of common file types. You can change this default set of extensions by editing them, and then using the 'Save' command (see below). At the bottom right of the 'Paths' box is a group of buttons with some further options: 'Show Hidden Files' -- when this button is selected (highlighted), LGSELECT will show files which are marked as "hidden" or "system" files. When hidden files appear in the file box they will be shown as disabled text, but they are still selectable. 'Save' -- click on this button to save the current list of paths and extensions directly into the LGSELECT program file itself, so that the next time you boot up, your paths and extensions will already be set. In order for this feature to work, LGSELECT.PRG must be in the same drive and directory as when you originally ran it, and you must not rename the program! 'Clear' -- this option clears the entire list of paths so you can start again with a blank slate if you wish. An alert box will appear, asking you to confirm the 'Clear' operation. 'FILENAME.EXT' -- this button will always show the search specification that was passed to LGSELECT by the calling program, regardless of whether you modify it in the main LGSELECT box or not. This lets you quickly return to the original search spec. 'Exit' -- returns to the main LGSELECT box. File Display Options. --------------------- OK, back to the main LGSELECT box. At the bottom of the file box is a box displaying the total number of files in the current directory that match the search specification, bordered by two buttons containing left and right arrows. If you click with the left mouse button on either arrow, you can flip the file display to show the last modification time and date of the files, or their size. If you click with the right mouse button on either arrow, you will return instantly to the name display. You don't have to be showing names to select files; all functions are still active no matter which display option is selected. The 'Date' display includes the day of the week that the file was last modified, and the 'Time' display is shown in am/pm format. The Close Box. -------------- In the GEM item selector, the function of the close box (located at the upper left of the file box) is to back out one level at a time from the current subdirectory. If you single- click the LGSELECT close box with the left mouse button, it behaves the same way. However, if you double-click the close box, or click on it with the right mouse button, you will instantly back out all the way to the root directory of the current drive. This is very handy for people with hard drives containing lots of nested subdirectories. The 'Directory' Line. --------------------- It should be a rare occasion that you'll need to edit the LGSELECT 'Directory' line manually, since you can select a different drive simply by clicking its button. However, if you do wish to edit the 'Directory' line, you can do so by moving the text cursor to the line (by clicking on the 'Directory' line once with the left mouse button, or by typing the down arrow), making your changes, and pressing Return. If the 'Directory' line has been changed when Return is pressed, the new directory will be set. (The GEM selector simply exits any time you hit Return. Ouch.) Another feature of the LGSELECT 'Directory' line is that you can back out to any level in the current path simply by clicking the right mouse button on the subdirectory you wish to return to. For example, if your current 'Directory' line reads: C:\UTILITY\ARC\ARCFILES\TEMP\*.* you can back out to: C:\UTILITY\*.* simply by right-clicking on the word UTILITY. (You can also double-click the left mouse button on the 'Directory' line to back out to a certain level.) The Up and Down Buttons. ------------------------ If you click with the right mouse button on the up or down arrows, you will jump instantly to the beginning or the end of the current directory listing. Clicking with the left button scrolls up and down through the list of files, just as with the GEM selector...but *much* faster. Selecting a File. ----------------- In the standard GEM selector, there are two ways to select a file from the list and exit the selector. You can click on it once with the left mouse button, and click the 'OK' button; or you can double-click it with the left mouse button. LGSELECT also lets you select a file and immediately exit by single-clicking it with the right mouse button. Passing a Title to LGSELECT. ---------------------------- This information is primarily of interest to programmers; if you don't care about passing a programmer-defined title to LGSELECT, you can skip to the next section. Programmers can pass LGSELECT two 12-character title strings, which will be displayed in the box in the upper right; this lets you tell the user the purpose of the file selector. The code to do this can be written in a way that is "transparent" to the system. In other words, if LGSELECT is present, your title appears; if not, the normal GEM selector works as usual. To pass the title strings in assembly language, the following code will do the job: move #90,contrl ; Set up contrl array move #0,contrl+2 move #2,contrl+4 move #4,contrl+6 ; This parameter differs from ; standard fsel_input call move #0,contrl+8 move.l #directory,addrin ; Address of directory line move.l #filename,addrin+4 ; Address of filename line move.l #title1,addrin+8 ; First 12-character title string move.l #title2,addrin+12 ; Second title string bsr aes ; Call the AES I'd recommend that if C programmers are interested in using the title string functions of LGSELECT, it would be a good idea to code the call to fsel_input with in-line assembly. Otherwise, you'll have to alter your compiler's bindings for fsel_input. Just for your information, all CodeHead Software products are written to take advantage of LGSELECT's title line feature, as is my earlier shareware release, ARC Shell. Don't Judge a File by Its Size. ------------------------------- Even though the LGSELECT.PRG file is over 36K on disk, when loaded into memory it only takes about 30K, since it throws away all unneeded initialization code and data at startup time. Miscellaneous. -------------- The Little Green Selector will read a maximum of 300 filenames from a directory. (Since the GEM desktop itself can only show 256 files in a single directory, this seemed like a reasonable limit.) If your current directory is too long to fit in the LGSELECT 'Directory' line, no harm will result; the GEM selector just crashes. If you're using TOS 1.0, be careful not to type an underline character in the 'Directory' line -- a bug in TOS 1.0's 'form_do' routine will cause the system to crash if you do. (Unfortunately, there's nothing LGSELECT can do to fix this bug.) Normally GEM steals all keypresses during the drawing of a dialog box, but LGSELECT uses some special tricks to allow you to "type ahead" while the dialog box is being drawn, or while a directory is being read. ------------------------------------------------ The Little Green Selector and this document are Copyright 1989 Little Green Footballs Software. All Rights Reserved. Please support shareware authors! (Note: A very early version of this program originally appeared in STart magazine, under the name "STart Selector.") ------------------------------------------------