4]----------------------------------- 3]THE SHELL GAME: A Continuing Column 3]Part Two of A Newcomer's Tour 3]Workbench Menus 3]By Brad Webb 4]----------------------------------- This month we'll continue our mini-series of Shell Games dedicated to the newcomer's point of view. While this column normally concentrates on the Shell and the CLI, in this series we will thoroughly examine the Workbench as well. For today's exercises you will also need a blank disk. One fresh from the box will do nicely. 3]LAST TIME... We took a good look at Workbench fundamentals in July 1991 previous column. This time we'll examine the power of pulldown menus available on the Workbench screen. As with the first column, there will certainly be some things discussed that you already know. Bear with me, as there are bound to be some people unfamiliar with every topic, and something here for everyone. There are two main versions of the Workbench in use. Most users have release 1.3 or the similar 1.3.2. The number of readers working with 2.0 is on the increase, so I won't leave them out. Since the differences in menu organization are substantial, let's examine each thoroughly. 3]AN OOPS AND AN EXTENSION I had originally planned to cover both the 1.3 and 2.0 Workbenches in this column. I didn't want users of either to be shortchanged. However, as I began writing it became clear that to do justice to either, several columns would be required. This column will handle Workbench 1.3. It will take two columns to handle Workbench 2.0. I suggest users of 1.3 read the upcoming columns on 2.0 Workbench to learn more about the new features awaiting them if they upgrade. Those who work with 2.0 by choice should read this column for a variety of reasons. Most 2.0 users are working with A3000s, which do come with 1.3. It is worth your time to be familiar with it. There are still programs in this world that do not work well with 2.0. Older programs may never be upgraded. Such is normal in the world of computers, and a knowledge of 1.3 may be vital to you someday, at least until 2.0 has been with us for some time. As a result, this mini-series has been extended somewhat. 3]PRELIMINARY THOUGHTS To be reading this column, you already know a lot about the Amiga. Still, let me review one or two things for you. The Workbench pulldown menus are made visible by pressing and holding the right Amiga mouse button. This displays the menu titles on the top bar of the Workbench screen. To see the contents of each menu, slide the mouse pointer up to the menu title of interest while continuing to hold down the right mouse button. This will "drop down" the menu items. To select an item, continue to hold the button down and slide down the list. When the item you wish to chose is highlighted, release the mouse button. Some menu items have sub-menus. When you choose such an item, a small submenu will pop up next to it. While still holding down the button. slide right and highlight the sub-menu item of interest. Release the mouse button to activate that selection. In this column we'll use a shorthand syntax to describe which menu item we are talking about. For example, if an exercise requires you to activate (select) the Version item in the menu titled Workbench, I'll write it as Workbench/Version. Workbench users also have to make windows active now and then. Click once in the window you wish to activate. Its top "drag bar" will show solid lines instead of ghosted when it is active. 3]THERE ARE THREE PULLDOWNS IN 1.3 The 1.3 Workbench has three pulldown menus, labeled Workbench, Disk and Special. The Workbench menu provides commands for general purpose Workbench maintenance and use, the Disk menu comprises commands aimed at helping you with your disk oriented tasks, and Special stores all other commands. In total, there are 13 commands we need to examine. We'll take them mostly in left-right, top-bottom order since they are already organized fairly well. Begin by pulling down all three menus and examining them. You will see most items are "ghosted." Ghosting indicates an item cannot be used at the present time. Most items require you to select an icon of some sort before you can use its capabilities. 3]THE WORKBENCH PULLDOWN Let's select an icon and go to work. Click once on your Workbench disk or hard drive partition which contains the system directories (like System, Prefs and Utilities). Now, go to the Workbench pulldown and select Open. Notice that this time Open is not ghosted. When you select it, the disk or partition window will open exactly as if you had double-clicked on the icon. This menu item then is another method of "opening" disks and drawers. You can also use this menu item to "open" or start a program. Here's how. Begin by opening the Utilities drawer. Please use the pulldown menu instead of double-clicking on it. Click once on the Notepad icon to select it. Select the Workbench/Open item once again. Notepad will begin running as it should. The Close selection has a more limited use than does the Open. This is due to the nature of Amiga programs. Once a program is running, it will normally place its own pulldown menus at the top of the screen, blocking the Workbench ones. You can still get at the Workbench menus by clicking on the Workbench screen to make it active. Selecting close at that point wouldn't be a good idea though, since there is no active window for Workbench to close. Only one window, or the Workbench itself, can be active at any one time. This is to ensure input from the mouse or keyboard goes where it is needed. How do we use the close item then? It is there to provide an alternate way of closing Drawer windows. You should still have the Utilities window open. Click once on the Utilities drawer icon (not in its window, but the icon you used to open the window). Now, select the Close item. The Utilities window will pop closed. Of course, we could have just used the close gadget on the Utilities window itself. This menu item can be handy when you have a large number of windows open. Rather than shuffling through them, you can close Drawer windows as long as their icons are visible. 3]DUPLICATE WILL COPY ANYTHING The next item in line is Duplicate. It is an all-purpose copy machine. You can use Duplicate to make copies of files, drawers and even disks. The basic technique is the same in all cases, so I'll just walk you through copying a file. Select a file for duplicating by clicking once on its icon. A good choice is the GraphicDump file in your Utilities drawer. Now, select Workbench/Duplicate. In just a few seconds you will have a new file in the Utilities drawer called copy_of_GraphicDump. That is probably not the name you want for your copy, so we will use the next Workbench menu selection to correct that situation. Make certain the icon for copy_of_GraphicDump is selected. Keep this step in mind: After making a copy of something, the ORIGINAL icon remains selected. If you go ahead and do a Rename before selecting the copy, you will accidentally change the name of the original. We will need two files to delete in a little while, so make a copy of the copy for practice. If you make a second copy from the original icon, it will just replace the first copy you made. Once you are certain the correct icon is active, select Workbench/ Rename. A small window will open with the icon's name inside it. You may use a number of keys to change the name contained to whatever you would prefer. You can use the Del and backspace keys to erase characters, the cursor keys to move the cursor about in the window and the Right Amiga and X key combination to empty the window entirely. Let's try that. Hold down the Right Amiga key, then press the X key. Release both keys. The window will empty. If you have clicked anywhere other than in that window, it will no longer be active. You will then have to click once in the window to activate it before pressing Right Amiga X. Type in a new name. Use DeleteMe to remind you what to do later when cleaning up this disk. Press RETURN and the icon assumes its new name. It will probably not be at a very good location within the window. I will show you how to correct that in a moment. While we are at it, rename the second copy you made a moment ago as Sacrificial. If you are the adventurous type, go ahead and try Duplicate with a drawer and a disk icon. When you duplicate a drawer, every file within is also duplicated. They also get the copy_of_ prefix. When you duplicate a disk, you will be asked for disk swaps as appropriate. The disk receiving the copy may be unformatted, formatted and blank or contain data. It doesn't matter, any data will be erased and an unformatted disk will automatically be formatted. 3]A BETTER WAY OF COPYING DISKS If you have two (or more) floppy drives on your system, here's a better method of duplicating a disk. Put the disk you want to copy in one of your drives. Place the disk on which you wish the copy in another. As before the disk receiving the copy may be unformatted, blank or have data. Now "grab" the icon for the disk you wish copied by placing the mouse pointer over it and holding down the left mouse button. Move that icon over the one for the disk to receive the copy. Release the mouse button and you are on your way. 3]INFO The Info item provides you with information (surprise!) about icons. Click once on any icon and then select this item. A window will pop open with a whole set of data about the program (tool), Trashcan, drawer or file (project) that belongs to the icon. The most important piece of data may be the "Type" data. This tells you whether the icon is attached to a drawer, tool, project or Trashcan (type=Garbage). Sometimes this is not obvious when looking at an icon. Click once on each type of icon and use Info to see the various sorts of data available with each type. You can also attach a comment to the icon by using the Comment type in box. Click once in the box then enter your comment. Example: "This is from my old wordprocessor" for a wordprocessing file. Press the RETURN key. Then click on the SAVE gadget to update the icon file. For all but disk icons, on the right side of the Info window are four gadgets labeled Not Archived, Readable, Writeable and Deletable. These gadgets control the status of the file. You can add or delete the word "Not" by clicking on the gadgets. When you later select SAVE, the file's status is changed accordingly. The only confusing gadget of these may be the Archived one. It is there for use by hard drive backup programs, so they can keep track of whether or not the file had been already backed up. Disk icons display the read/write status of the disk, dependent on the position of the write protect tab. Project icons have a line called Default Tool. In this space is listed the tool (program) used to create the file attached to the icon. You can change this entry, but be certain the new tool is compatible with the project before you try it. If you make a mistake, changing the Default Tool back should rectify matters. You make this change by clicking once in the type-in box to activate it, then continue as you did when renaming an icon. The Tool Types area is used to specify special parameters for use by the file, disk, etc. attached to the icon. Usually, this will set up parameters for a tool (program) to use. Typically, the manual that came with the program will describe these parameters and how to enter them. You can use the arrow gadgets to scroll through them if there are more than one for a given icon. The ADD and DELETE gadgets do as expected. To add one, type it in the box provided, then click on ADD. Move to another blank line with the arrow gadgets, add another if needed, and so on. Project and Tool icons show an area called stack. If a special amount of memory, called the stack, needs to be adjusted to accommodate the file, this area will show a number designating how large the stack should be. It is not a good idea to change this number unless you are certain how the file will respond. The system will crash if the stack is improperly adjusted. 3]DELETING FILES WITHOUT USING THE TRASHCAN The last selection in this menu is Discard. This one is dangerous. It is one method of removing files and entire drawers from your disks, so be sure that's what you want to do before you select Discard. Some time ago we created a file called DeleteMe in the Utilities drawer. Let's use it as the example for this menu item. Open the Utilities drawer if necessary. Click once on DeleteMe, then select the Workbench/Discard item. Your Amiga will present you with a warning requester. Click once on "ok to discard" to complete the deletion. The "forget it!" gadget is provided in case you accidentally activate Discard, or change your mind. 3]DELETING FILES BY USING THE TRASHCAN The more traditional way of deleting a file from the Workbench is with the Trashcan icon. Let's walk through this method for the benefit of those who have never done it. Begin by dragging the Sacrificial icon over the Trashcan icon and releasing it. Sacrificial will be moved into the Trashcan. Once there it remains there. It is not erased from the disk, as is the case with some desktop type computer interfaces. Prove this to yourself by double-clicking on the Trashcan icon to open its window. To actually remove the Trashcan contents from the disk, you must first select the icon by clicking on it once. If the window is still open, the icon may still be active. If the lid of the trashcan is raised, the icon is active. 3]THE DISK PULLDOWN MENU We now use the first selection in the Disk pulldown menu. Select the Empty Trash item in this menu. The contents of your Trashcan will be removed forever. The Trashcan is really only a special drawer or directory. It has several special properties. First, the Disk/Empty Trash menu item will delete all its contents as we have seen. Second, you can neither delete this drawer nor copy it from the Workbench. Go ahead and try Workbench/Discard and Workbench/Duplicate on your Trashcan. Since there is a Workbench/Discard item available, the Trashcan is not really necessary. Some Amigans feel it is rather ugly and would prefer to be without it. In addition it takes up disk space that could be used for other things. In a moment we will see how to prepare a disk for use from the Workbench. That process always puts a Trashcan on the disk being prepared. If that is the case, and there is no way to delete the Trashcan from the Workbench, how do you create a disk without one? Answer: By using the special windows called the Shell and the CLI. The Trashcan can be deleted from a disk through commands typed in one of these windows. Disks can also be prepared for use (called formatting or initializing) in a Shell or CLI in such a way as to avoid creating a Trashcan in the first place. We'll look at how this is done in an upcoming column. That provides a neat lead in to the next Disk menu command, Initialize. To use this command you will need either a blank disk or one with information you don't mind losing. Initializing a disk, also called formatting a disk, will erase any data currently on a disk with no hope of recovery. All disks must be initialized once before you can use them to store information. This keeps the price of disks low by allowing many computers to use the same disks. You use the format or initialize commands to prepare them for a specific system. Remember that when you select Workbench/Duplicate for a disk, the Duplicate command first does an initialize automatically. Place a blank disk, or one with data you are willing to erase, in your disk drive. Be certain, because you can't retrieve the data. Select the Initialize menu pick. A requester will pop up warning you that if you continue, any data on the disk will be lost. Click on the "continue" gadget. A window will display information keeping you posted on the progress of the initialization. Once complete, your newly initialized disk will be called Empty. Use the Workbench/Rename menu item to call it whatever you want. The disk can then be used to store information or programs. You might use it to store put wordprocessing documents, spreadsheets, saved games . .. You can even create drawers on your newly initialized disk to organize data and programs. Here's how that is done. On your Workbench disk or boot partition, you will find a drawer labeled Empty. Drag that icon onto your newly initialized disk icon. When you next open that disk's window, there will be a new empty drawer in it. Use Workbench/rename to call it whatever you would like. You can even create drawers inside drawers using this technique. If you first open the window for the disk, you can drag the Empty icon into the window and place it exactly where you wish. Drag the Empty icon over again to create a second new drawer and so on, renaming them as you go. 3]THE SPECIAL PULLDOWN MENU You may find that drawers you put in your new disk's window aren't arranged neatly. This will especially be likely if you dragged the Empty icon directly onto the disk icon instead of into its window. In that case, each copy may be stacked on top of the next. The Amiga will be happy to arrange the icons in any window in neat rows and columns for you. To clean up any window, such as the new disk's window, click once on the icon used to open the window --in this case, the disk icon itself. Then select the Cleanup item in the last pulldown menu, Special. The window will snap into order. To clean up a drawer's window, you would first activate the drawer in the same way and then choose Cleanup. Unfortunately, if you now take the disk out of the drive and put it back, the computer will forget where the icons were after you used Cleanup. To make their new locations permanent, you must use the Snapshot item in the Special pulldown. I know we're going out of order here, but the sequence is more logical this way. To use Snapshot to fix an icon in place, you must first activate it with a single click. There is a way to activate all the icons in a given window and Snapshot them at once. Pick a window to experiment with. The main window of the newly formatted disk will be perfect if you followed along; otherwise, use some other where you don't mind the icons being moved a bit. Either use Cleanup on the window as just described or move the icons around a bit by dragging. Now, click once on one icon in the window. Then, HOLD EITHER SHIFT KEY DOWN AND CLICK ONCE ON ALL THE OTHER ICONS IN THE WINDOW, at least those that are visible. This is called an "extended select". Now, activate the Special/Snapshot item. Click anywhere in the background to deselect the icons. Using the window scroll bars/arrows if needed, fix the positions of any other icons in the window that may not have been visible. You can use Snapshot to define the size and position of any window, as well as to determine the locations of the icons within. The exercise I'm about to walk you through sounds much more complicated than it really is, so don't let all the words bother you. Open a window by double-clicking on a drawer. This is going to make the size and position of the window on screen a bit different from what they now are. Move the window and change its size. Close it, then reopen it. The computer remembered the position and size, which is fine. However, if you now remove the disk from the drive or close the parent window for the window you were working with, the computer would forget the changes you made. The parent window is the one containing the icon you clicked on to open the window you were actually manipulating. Close the window you were experimenting with, then close its parent window or remove the disk from the drive and replace it. Reopen your experimental window and modify its size and location again. This time, click on the drawer (or disk) icon used to open the window. Select Snapshot. Once again remove the disk after closing all its windows, or close the parent window and then reopen everything. This time the computer remembered the new size and location of your experimental window and it will continue to do so until you change them and use Snapshot again. The remaining items in the Special menu will not take long to deal with. The Last Error selection is a misnomer. From time to time the Amiga's operating system will send you a message by printing it on the drag bar at the top of the Workbench screen. These messages don't remain there long since the bar is used for so very much, such as dragging the screen and displaying menu items. To redisplay the last such message, select the Last Error item. Right now that may not work for you as there may have been no messages displayed since you turned your computer on. Let's ensure there will be a message to redisplay by using another Special menu selection. Select the last item, Version, in the Special menu. The drag bar of the Workbench screen will display the internal version numbers of your Kickstart ROM (which contains a portion of the Operating System that is hard wired into your computer) and the internal version number of your Workbench disk. These numbers do not bear a direct relation to the release numbers. For example, the internal version number for Release 1.3.2 Workbench might be 34.28. As minor modifications are made, the internal version number will be increased but the release number (1.3.2 in our example) will not be adjusted unless major changes are made. There may be times when these numbers are important to you or an Amiga repairman and this menu item lets you view them. Now click on the Workbench screen background to cause the drag bar to resume its normal appearance. This is the time to try the Last Error item. Using it will cause the most recent message, the one about version numbers, to be redisplayed. Keep the Last Error item in mind if you ever see something flash by on the drag bar and you didn't quite notice what it said. There remains only one item to explore, Redraw. Go ahead and select that item. The screen will flicker a bit as the display is redrawn. If your screen display is ever disrupted by an unfriendly program, this menu item may restore it to normal. 3]NEXT TIME... We take a close look at 2.0 Workbench's pulldown menus next time. You will notice a great deal of refinement as Commodore continues to make Workbench a more professional and useful tool. Please join me then. 4]END OF TEXT