Browser -- a programer's "Workbench". Introduction The Amiga "Workbench" has some serious deficiencies as a working environment. The most important one is that it doesn't let you operate on just any file (this is rumored to be fixed in 1.4, by the way), but there are others. It's designed to be easy to learn and use, but it just isn't very powerful. This program is an attempt to deal with some of these problems. It is not a complete replacement for Workbench, nor is it intended to be. There is no attempt to support icons, and there are no disk-oriented functions (formatting, copying, etc...). What Browser does allow you to do, easily and conveniently, is to move, copy, rename, and delete files and directories. It will also let you execute either Workbench or CLI programs, either directly by double- clicking them or by selecting them from a menu. By combining these you can set up a complete operating environment that will, to a large extent, replace both Workbench and the CLI. Browser presents you with a set of windows, representing directories, with all the files and directories within each listed in alphabetical order. Directories, displayed in color 2 (red/orange), are listed first, followed by the files. Selected files are displayed in inverse video. Selecting Files You can select individual files three ways. First, just click on a file name. This will select that file and deselect all others. If you hold down the shift key when you click on the file, it will be selected without deselecting other files. This way you can build a list of files to operate on. So far this is just like Workbench, but if you click a selected file while holding down the shift key, it will be deselected without affecting other selected files. This lets you take back mistakes. Finally, you can use the menu items "Sel All" and "Sel Match" to select a group of files at once. "Sel All" will select all files in the active window. "Sel Match" will allow you to enter a pattern and then select only files matching that pattern in the active window. These normally act as toggles... if you have any selected files in the active window they will be deselected if they match. Actions There are, again, three ways to manipulate selected files. First, you can drag a file or selected files to another window by holding down the left mouse button while you move the mouse. When you release the button, Browser will attempt to move the files to the location you indicate. This is just like the Workbench. Secondly, double-clicking a file will open it. If it's a directory, it will be opened and files in it will be displayed. If it's a program with an accompanying '.info' file, it will be launched as a Workbench task. This will also work with Projects, if the accompanying .info file specifies a tool. Finally, Browser will ask you if you want to launch it as a CLI program. Any other files selected will be passed to the new program, either on the CLI command line or in the Workbench Args structure. This is the normal Workbench shift-double-click method. Third, you can select a menu item. Menus There are two main Browser menus. The first, "Browser", relates to the browser environment itself. The second, "Actions", relates to the files and directories displayed in Browser's windows. Menu items act either on selected files or on the currently active window. There are additional menus (called Tools Menus) that can be set up by the user. Browser Menu Open This entry is equivalent to double-clicking the selected file. It is included for consistency with Workbench. Strictly speaking it should be in the Actions menu, but it seems to fit here better. Close This entry is equivalent to clicking the active window's close gadget. Again, it's included for consistency with the Workbench. Rescan This entry requests Browser to re-scan the directory displayed in the active window. This is equivalent to, but a lot more convenient than, closing and re-opening the window. I suppose I could poll the disk for these, but if you use floppies much this becomes slightly inconvenient. File Size When this is selected it toggles a bit associated with the active window that indicated whether the size of each file should be displayed alongside the name. In a future version this will be expanded to include a full 'list'-style listing. Sel All This selects all files in the active window. Actually, it toggles the selection of each file. Currently selected files will be deselected. Sel Match... This is the same as Sel All, except that a pattern may be provided to further restrict the selection. Options This allows you to modify the global behaviour of Browser to some extent: X Toggle Selections This affects whether a selection through the menu, or a shift-click, will deselect an already selected file. X Move files into subdirectories This effects whether you can move files into a subdirectory by dragging them to it and releasing the mouse button when the mouse is over the directory's name. If this is not set you have to open the directory first. X Ask before moving into subdirectories If you permit files to be moved into sub- directories, this determines if Browser will prompt you beforehand. Quit This selection closes all windows and terminates Browser. Actions Menu The entries in this menu act on files rather than changing the state of Browser. WB Tool The currently selected file (singular) is entered into the Tools menu as a workbench tool. CLI Tool... The currently selected file (singular) is entered into the Tools menu as a CLI tool. Browser will pop up a requestor and allow you to add additional arguments. Rename... The currently selected file (singular) is renamed. Browser will pop up a requestor and allow you to enter the new name. Duplicate... The currently selected file (singular) is duplicated. Browser will pop up a requestor and allow you to edit the new name (generated by BumpRevision: "file" becomes "copy of file", and so on). Make Dir... Creates a new directory in the currently active window. Browser will pop up a requestor and allow you to specify the name of the new directory. Delete Deletes all selected files. This will only delete directories if they happen to be empty. Delete All Deletes all selected files AND directories, recursively. Tools Menus These menus (starting with Tools) are initially empty. They are filled in by selecting "Add * Tool" or from the file "s:browser.inittab". When you select an entry in these menus they're run (either as workbench or CLI programs) with all selected files being passed to the program. If you have a choice, you should make a program run under the Workbench... it's MUCH more reliable. Environment Browser can itself be run from either the Workbench or the CLI. There are two separate versions of Browser on the distribution disk. The first, "browser", is a normal CLI/Workbench program. The second, "bgbrowser", is basically the same as "browser", but contains some extra code that automatically detaches it from your CLI. Browser uses a file, "s:browser.inittab", to pre-load the command menus. Each line in the file is a separate menu item, made up of 5 fields separated by semicolons: name;environment;command;stack;window The first field is the name that is to appear in the menu. This name can be preceded by the name of the menu to insert it in followed by a period. If the menu name is left off, the "Tools" menu will be used. For example, "Applications.Terminal Emulator" will create a menu entry for "Terminal Emulator" and install it in the "Applications" menu. If the menu doesn't already exist, it will be created. The two environments currently supported are the CLI and the Workbench. Project files (such as AmigaBasic programs) aren't supported through the menu system at this time, though they may be at a later date. They do work just fine when you double-click them. If our terminal emulator was to be run as a Workbench program, then this field should contain "Workbench". If it can't run under the Workbench, then it should contain "CLI". It is better, if possible, to run programs under the Workbench. It's a cleaner environment, and you don't get extra windows cluttering up your display. The next field is the name of the command. This should contain the full path name to the program. If the command is a CLI command, additional arguments can be included at this point. The names of any files high- lighted when this menu is selected will be added to the end. If the command is a Workbench command, this should just be the program name. Highlighted files will be passed to the program in the Workbench Args structure. The next field is the stack size. It may be left off, and will default to 8K. The last field is the window. For a CLI command, this is the window that will be opened to run the CLI in. For a Workbench command, this is the ToolWindow that will be passed to it. If it's left off a default will be used. Applications.Terminal Emulator;Workbench;sys:system/Termulator Limitations: The CLI capability occasionally leaves you in an interactive CLI after you exit the program. This is caused by using one of the BREAK keys while you're in the program. I had to leave this in to get finicky CLI programs, such as Manx 'Z' editor, to work properly. If you're copying a file to disk and you get a disk error, occasionally browser will appear to ignore disk errors and keep on trying to write. Actually, Browser handles all disk errors that get reported to it. For some reason AmigaDOS doesn't report errors promptly. I suspect this is related to requesting writes larger than a disk buffer, but I don't plan on having Browser do anything about this in the near future. Browser seems to run just fine with only the standard 4K stack. The minimum environment you need to run browser is: libs (dir) icon.library If you also want to run CLI programs, you also need: c (dir) cd EndCLI Failat NewCLI Run Stack l (dir) Ram-Handler These are needed to run the little scripts Browser builds in RAM: when you run a CLI program. Author: Peter da Silva U.S.Mail: 1620 Enclave Parkway #2710 Houston, TX 77077 Internet address: peter@sugar.uu.net UUCP path: texbell!sugar!peter Compuserve: 70216,1076 Donations: If you find this program useful, you may send a donation to the author, Peter da Silva. For a donation of thirty dollars or more you will receive the latest version of Browser (or, if you prefer, the next version whenever it comes out). I plan on listing donors in future versions of the manual in a "Sponsors" section. If you want your name to be used, let me know. If you don't say anything, I'll assume you want anonymity and will respect your privacy. Whatever you do I'll never sell your name to a mailing list :->.