MICROFICHE FILER PLUS TABLE OF CONTENTS How to use this Guide Chapter 1 The Microfiche Filer 1-1 What is a Database?...........................................1-1 The Microfiche Metaphor.......................................1-1 Chapter 2 Getting Started 2-1 Getting Started from the Workbench............................2-1 Making Backups..............................................2-1 Running MFF.................................................2-2 Getting Started from CLI......................................2-3 Making Backups..............................................2-3 Running MFF.................................................2-5 Chapter 3 Quick Tour 3-1 Chapter 4 Creating a New Database 4-1 Creating a New Database.......................................4-1 Setting Up a Data Definition..................................4-2 Setting Up the Forms..........................................4-2 Saving the Database...........................................4-3 Entering Data.................................................4-3 Chapter 5 The File View 5-1 The Fiche Window..............................................5-1 The Magnification Window......................................5-2 File Types....................................................5-2 Database Files..............................................5-2 Directories.................................................5-2 Parent Dir..................................................5-2 Other Files.................................................5-3 Selecting a File..............................................5-3 The Directory Tree............................................5-3 Changing Directories..........................................5-3 Making New Directories........................................5-4 Copying Files.................................................5-4 Copying Data Definitions......................................5-5 Deleting Files................................................5-5 Renaming Files................................................5-5 Creating a New Database.......................................5-6 Opening an Existing Database..................................5-6 Opening the Workbench Screen..................................5-6 Running a Macro...............................................5-6 Leaving.......................................................5-6 i Chapter 6 The Data View 6-1 The Fiche Window..............................................6-1 The Scrollbar...............................................6-2 The Magnification Window......................................6-2 Adding Blank Records..........................................6-2 Selecting Data................................................6-3 Selecting a Single Record...................................6-3 Selecting a List of Records.................................6-3 Grouping Selected Records...................................6-4 Sorting Records...............................................6-4 Editing Records...............................................6-4 Copying Records...............................................6-5 Deleting Records..............................................6-5 Printing......................................................6-5 Displaying Totals...........................................6-5 Saving the Database...........................................6-6 Loading Pictures..............................................6-6 Recomputing Calculated fields.................................6-6 Opening the Workbench Screen..................................6-7 Running a Macro...............................................6-7 Leaving.......................................................6-7 Emergency Save and Exit.......................................6-8 Chapter 7 The Form List Window 7-1 The Data Definition Button....................................7-1 Moving Forms..................................................7-2 The Display Form..............................................7-2 The Edit Form.................................................7-2 The Sort Form.................................................7-2 The Print Form................................................7-3 Adding Blank Forms............................................7-3 Editing Forms.................................................7-3 Copying Forms.................................................7-4 Deleting Forms................................................7-4 The Scrollbar.................................................7-4 Chapter 8 Editing and Shortcut Keys 8-1 Editing Keys for Text Edit Fields.............................8-1 Insertion Keys..............................................8-1 Cursor Movement Keys........................................8-1 Deletion Keys...............................................8-2 Shortcut Keys.................................................8-2 Next Field and Previous Field...............................8-2 Menu Shortcut Keys..........................................8-3 Requester Shortcut Keys.....................................8-4 Cycle Field Shortcut Keys...................................8-4 ii Chapter 9 The Data Definition Editor 9-1 Field Names...................................................9-2 Field Types...................................................9-2 Text........................................................9-2 Number......................................................9-2 Picture.....................................................9-3 Calculated..................................................9-3 Formulas......................................................9-3 Adding Fields.................................................9-4 Deleting Fields...............................................9-4 Undeleting Fields.............................................9-5 Changing Field Names..........................................9-5 Changing Field Types..........................................9-5 Editing Formulas..............................................9-5 The Consequences of Change....................................9-5 The Scrollbar.................................................9-6 Leaving.......................................................9-6 Chapter 10 The Form Editor 10-1 Changing the Form's Name......................................10-1 Sizing the Form...............................................10-2 Adding Fields.................................................10-2 Deleting Fields...............................................10-2 Moving Fields.................................................10-2 Sizing Fields.................................................10-3 Choosing Field Types..........................................10-3 Ordering Fields...............................................10-4 Leaving.......................................................10-4 Chapter 11 The Record Editor 11-1 Editing Text..................................................11-1 Editing Numbers...............................................11-2 Editing Pictures..............................................11-2 Editing Another Record........................................11-2 Leaving.......................................................11-3 Chapter 12 Pictures 12-1 IFF Pictures..................................................12-1 Icon (.info) Pictures.........................................12-1 Picture Squeezing.............................................12-2 Color Translation.............................................12-3 Picture Stretching............................................12-3 Chapter 13 The Picture Attribute Editor 13-1 The Picture Filename..........................................13-1 Picture Squeezing.............................................13-1 iii Color Translation.............................................13-1 Stretching....................................................13-2 The Color Translation Table...................................13-2 Automatic Color Translation.................................13-2 The Current Color...........................................13-3 The Color Translation Table.................................13-3 The Background Color........................................13-3 Reading the Picture...........................................13-4 Leaving.......................................................13-4 Chapter 14 The Selection Editor 14-1 Selection Criteria............................................14-1 The Operators...............................................14-2 Examples....................................................14-3 Other Considerations........................................14-4 Clearing the Selection Criteria...............................14-4 The Scrollbar.................................................14-4 Leaving.......................................................14-5 Chapter 15 Printing 15-1 Print Options.................................................15-1 Workbench Preferences Used for Printing.......................15-4 Print Forms...................................................15-4 Pictures......................................................15-5 Printing......................................................15-5 Printing to a File............................................15-6 Printing Totals on the Screen.................................15-6 Chapter 16 Preferences 16-1 The Preferences File..........................................16-1 Preferences Which Are Effective Immediately...................16-2 Preferences Which Are Effective Only at Startup...............16-4 Saving Preferences Permanently................................16-6 Leaving.......................................................16-6 Chapter 17 Intoduction to Macro Programming 17-1 The Basics....................................................17-1 An Auromatic Selection Example................................17-2 Enhancing the Automatic Selection Example.....................17-3 A More Sophisticated Example..................................17-3 An Elaborate Printing Example.................................17-4 Running an Macro in a File....................................17-6 Summary.......................................................17-7 iv Chapter 18 Macro Reference Guide 18-1 Macro Files...................................................18-1 Synchronous vs Asynchronous Macros............................18-2 Running a Macro Upon Startup..................................18-3 Macro Commands................................................18-3 Error Codes...................................................18-4 Command Descriptions..........................................18-5 abandon_and_load_database [quietly] s.......................18-5 abandon_to_file_view [quietly]..............................18-6 abandon_to_workbench [quietly]..............................18-6 add cv......................................................18-6 delete [quietly]............................................18-6 display s...................................................18-6 display_picture s...........................................18-7 exit_and_load_database [quietly] s..........................18-7 exit_to_file_view [quietly].................................18-7 exit_to_workbench [quietly].................................18-7 first.......................................................18-7 get cv......................................................18-8 get_blank cv................................................18-9 get_data_def cv.............................................18-9 get_form_list cv............................................18-9 get_print_options cv.......................................18-10 load_database s............................................18-10 lock.......................................................18-11 move_selected_to_front.....................................18-11 next.......................................................18-11 print......................................................18-11 print_current_record.......................................18-12 put cv.....................................................18-12 put_form_list cv...........................................18-12 put_print_options cv.......................................18-12 request s..................................................18-13 save_database [quietly]....................................18-13 select_all.................................................18-13 select_by_field cv.........................................18-13 select_none................................................18-14 sort.......................................................18-14 string_request s...........................................18-14 unlock.....................................................18-14 v Appendix A Concepts for New Users A-1 Keys..........................................................A-1 The Mouse.....................................................A-1 The Active Window.............................................A-2 Appendix B Import and Export B-1 Text File Export..............................................B-1 Text File Import..............................................B-1 Data Transfer using Arexx.....................................B-1 Appendix C Tips and Shortcuts C-1 Quick Data Entry..............................................C-1 Determining the Total Number of Records.......................C-1 Keeping the Field Contrents for Reference.....................C-1 Appendix D Troubleshooting D-1 Out of Memory.................................................D-1 MFF Seems Slow................................................D-2 Appendix E Quick Reference E-1 Text Editing Keys.............................................E-1 Shortcut Keys.................................................E-1 Selection Criteria............................................E-2 Index vi HOW TO USE THIS GUIDE NEW AMIGA USER 1. Read the "Introduction to Amiga" manual that came with your Amiga so that you are familiar with using the mouse, "clicking" on gadgets,making menu selections,and so on. 2. Read Appendix A - Concepts for New Users to learn a little more about using the keyboard and windows. Now you are an experienced user! Continue with the next section as an experienced user would. EXPERIENCED AMIGA USER 1. Read Chapter 1 - The Microfiche Filer to learn what Microfiche Filer Plus can do for you. 2. Read Chapter 2 - Getting Started. 3. Go through the "Quick Tour" in Chapter 3 which takes you on a quick trip through Microfiche Filer Plus. 4. If you want to create a new database from scratch read Chapter 4 - Creating a New Database. 5. Start using Microfiche Filer Plus! You may wish to use some of the databases that we've given you for a quick start. 6. Consult Appendix E - Quick Reference for information on shortcut and editing keys as you work. 7. Consult the rest of this guide(using the Index and Table of Contents)as you deem necessary. ADDITIONAL INFORMATION Additional information about the program,the disk,or the manual can be found in the Read Me file on the disk. Just double-click on it to read it. CHAPTER 1 - THE MICROFICHE FILER WHAT IS A DATABASE? You work with databases every day,including your address book,wine list, diskettes full of programs and pictures,and perhaps a storyboard,an inventory of your assets,or an inventory of your products in a warehouse. All of these databases can be manipulated more easily using Microfiche Filer Plus(also referred to as MFF). MFF helps you to: Store text,numbers,and pictures in your computer. Sort this information any way you like. View this information any way you like. You define the look of the windows through which you view your data. Scan this information with a flick of the wrist to find what you are looking for. Add new information or change the old at any time. Print this information in a variety of ways(including the pictures!) Import and export this information to and from other programs on your Amiga. Automate your data manipulation tasks by running ARexx macros. Store and manipulate data for other applications that can communicate via ARexx. THE MICROFICHE METAPHOR Using MFF,you scan your information using the elegant and time-tested(yet new to computers!)method of scanning a microfiche. Your data is organized as a two- dimensional sheet of text and pictures over which you drag a magnifying glass to locate your data. Unlike the venerable microfiche,though,your information is not immutably cast in celluloid,but may change as you add information,change the way your view this information,or change its order. 1-1 The microfiche does have one great advantage over every other form of information storage;it is incredibly easy to scan to find what you are looking for. You do not have to leaf through pages in a book or type cryptic commands to a computer;you simply put it in the reader and slide the magnifying glass around until you locate the pertinent information! This is how Microfiche Filer Plus works. For instances,you have stored you address book on a microfiche(on the Amiga of course,not on celluloid!). To one side,you see your condensed microfiche,which, though unreadable,appears to contain several dozen address cards. You slide your computerized magnifying glass over it and quickly locate the person you must call. You point at that person's anme and up pops a window full of information about that person,including his address,phone number,some notes about him,and a picture! Upon noticing that he works for Commodore,you remember that you must call someone whose name you can't remember who also works for Commodore. With another flick of the wrist you instantly sort your address book by company name and immediately locate the other Commodore employee. Turning your Amiga into a Microfiche Filer opens the door to a new world of databases that are actually easy to use. You are now able to scan your computerized data with ease in a way never before imagined(and never-before possible,until the introduction of a computer with the speed and power of the Amiga)! 1-2 CHAPTER 2 GETTING STARTED GETTING STARTED FROM THE WORKBENCH MAKING BACKUPS If you have two disk drives: 1. Put the Microfiche Filer Plus master diskette in your external drive(DF1:) and put your blank diskette(that will become your working copy)in your internal drive(DF0:). Then drag the disk icon that says Microfiche Filer Plus onto the disk icon for your blank diskette(which may read BAD if this is a fresh,never- before-used diskette). 2-1 2. Follow the directions on the screen,putting your system disk back into DF0: when you are asked and putting your blank diskette back into DF0: when you are asked. 3. When the copy is done,put your Microfiche Filer Plus master diskette away in a safe place. NEVER use the master for anything but making working copies. If you have one disk drive: 1. Put the Microfiche Filer Plus master diskette into your disk drive. 2. Click on the disk icon that says Microfiche Filer Plus. This select the disk. 3. Choose Duplicate from the Workbench menu. 4. You are asked to put your system disk back into the disk drive. Do that and click on RETRY. 5. Then,you are asked to put the Microfiche Filer Pluse master diskette back into the disk drive. Do that and click on RETRY. 6. Soon,the diskcopy program announces that you should put the destination diskette(a blank diskette that will become your working copy)into the disk drive. Do it and click on RETRY. 7. Continue to follow the directions on the screen,swapping the diskettes in and out until the copy is complete. 8. When the copy is done,put your Microfiche Filer Plus master diskette away in a safe place. NEVER use the master for anything but making working copies. If you have a hard disk: 1. Put the Microfiche Filer Plus master diskette into DF0:(the disk drive in the Amiga chassis). 2. Double-Click on the disk icon for your hard disk. 3. Double-Click on the disk icon that says Microfiche Filer Plus. 4. Drag the drawer that says MFF_Files over into the hard disk window. 5. Drag the drawer that says Microfiche over into the hard disk window. 6. When the copy is done,put your Microfiche Filer Plus diskette away in a safe place. NEVER use the master for anything but making working copies. RUNNING MFF If you are just beginning and have not yet read the Quick Tour,don't actually run MFF yet. This section is for your information only. 2-2 There are two ways to run Microfiche Filer Plus. The most common way is to open a database project that already exists. This may be a sample database that we have provided or a database that you have created. These are usually found in a drawer called Microfiche. To open a database project: 1. Put your working copy of the MFF diskette into a disk drive. 2. Open the disk by double-clicking on the icon labeled copy of Microfiche Filer Plus(or whatever you have named this diskette). 3. Open the drawer labeled Microfiche by double-clicking on it. 4. Some database project icons are displayed. Open one by double-clicking on it. This automatically uses the MFF tool to work on your database. To start Microfiche Filer Plus with no database project: 1. Put your working copy of the MFF diskette into a disk drive. 2. Open the disk by double-clicking on the icon labeled copy of Microfiche Filer Plus(or whatever you have named the diskette). 3. Open the drawer labeled MFF_Files by double-clicking on it. 4. The MFF icon is displayed. Open it by double-clicking on it. MFF then shows you the File View to allow you to select a database to view or to create a new database. GETTING STARTED FROM THE CLI MAKING BACKUPS If you have two disk drives: 1. At the CLI prompt type DISKCOPY DF0: TO DF1: and press RETURN. It prints a message telling you to put the source diskette (the Microfiche Filer Plus master diskette)into DF0: and to put the destination diskette diskette(a blank diskette that will become your working copy)into DF1:. 2. Put the diskettes in the proper drives and press RETURN. 3. When the copy is done,put your Microfiche Filer Plus master diskette away in a safe place. NEVER use the master for anything but making working copies. 2-3 If you have one disk drive: 1. At the CLI prompt type DISKCOPY DF0: TO DF0: and press RETURN. It prints a message telling you to put the source diskette (the Microfiche Filer Plus master diskette)into DF0:. 2. Put the Microfiche Filer Plus master diskette into the disk drive and press RETURN. 3. Soon,the diskcopy program announces that you should put the destination diskette(a blank diskette that will become your working copy)into the disk drive. Do it and press RETURN. 4. If you have a small memory machine,the diskcopy program will probably tell you to put your source diskette back in the drive. Do this and press RETURN again and continue to follow the directions on the screen until the copy is complete. 5. When the copy is done,put your Microfiche Filer Plus master diskette away in a safe place. NEVER use the master for anything but making working copies. If you have a hard disk(this assumes that you call your hard disk DH0:0: 1. Put the Microfiche Filer Plus master diskette into DF0:. 2. At the CLI prompt type MAKEDIR DH0:MFF_FILES and press RETURN. This creates the directory MFF_Files where Microfiche Filer Plus,the MFF preferences,and the MFF project icon files will be put. YOU MUST USE THE NAME :MFF_FILES. MICROFICHE FILER PLUS LOOK FOR CERTAIN FILES(SUCH AS THE PREFERENCES FILE)IN THIS DIRECTORY. 3. At the CLI prompt type COPY DF0:MFF_FILES DH0:MFF_FILES ALL and press RETURN. This copies all of the files in the MFF_Files directory. 4. At the CLI prompt type MAKEDIR DH0:MICROFICHE and press RETURN. This creates the Micofiche directory where some databases will be put. 5. At the CLI prompt type COPY DF0:MICROFICHE DH0:MICROFICHE ALL and press RETURN. This copies all of the sample databases into the Microfiche directory. 6. If you will every want to run MFF from Workbench,you must also copy the drawers' icon files by typing COPY DF0:MFF_FILES.INFO DH0: and COPY DF0:MICROFICHE.INFO DH0: 2-4 7. When the copy is done,put your Microfiche Filer Plus master diskette away in a safe place. NEVER use the master for anything but making working copies. RUNNING MFF IF YOU ARE JUST BEGINNING AND HAVE NOT READ THE QUICK TOUR,DON'T ACTUALLY RUN MFF YET. THIS SECTION IS FOR YOUR INFORMATION ONLY. To run Microfiche Filer Plus simply type :MFF_FILES/MFF and press RETURN. Later,you may wish to put :MFF_FILES in your path so that you may omit the :MFF_FILES from the command(read in your Amiga manuals about the PATH command). Microfiche Filer Plus automatically takes you to your default directory on your Microfiche Filer Plus master diskette and displays the file list of that directory. The default directory is set to :Microfiche on your master diskette but you may change it with the MFF Preferences Editor. Alternatively,you may type :MFF_FILES/MFF DATABASE and press RETURN. Of course,you should substitue your existing database name for the word database. This way Microfiche Filer Plus starts up and immediately opens your database. You may also use the -m option on the command to instruct Microfiche Filer Plus to immediately run an ARexx macro after loading the database(for more information on macros,see Chapter 17 - Introduction to Macro Programming). 2-5 CHAPTER 3 QUICK TOUR You are about to embark on a Quick Tour of Microfiche File Plus. You will open databases,and view,edit,and print them. You will tour the program,learning the basic features while actually working with useful databases. After taking this tour,which should take about an hour,you will be able to construct and view your own databases,only referring to this manual periodically. BEFORE YOU BEGIN Before you begin this tour,read Chapter 2 - Getting Started,if you haven't already. After that,you will have a working diskette in hand to use for this tour. Do NOT use your Microfiche Filer Plus master diskette! STARTING MICROFICHE FILER PLUS 1. Put your working copy of the Microfiche Filer Plus diskette in your disk drive. 2. Double-click on the disk icon that says copy of Microfiche Filer Plus. This opens a window with several drawers in it. 3. Double-click on the drawer that says Microfiche. This opens another window which contains several drawers and microfiche icons. 4. Double-click on the icon that says Address_Book.mff. This starts Microfiche Filer Plus and automatically opens your address book database. If the screen just flashes when you try to open the database or if a requester comes up stating that there is not enough memory to start MFF,you must make some memory available. Note that you must have at least 512K,and must be using Workbench 1.2 or later! To free some memory try closing any other windows that you have open. If it still won't run,try rebooting(hold down the CTRL,Left Amiga,and Right Amiga keys)and start again. If it still won't run,try rebooting using a copy of your original Version 1.2 Workbench(with nothing in RAM:). 3-1 Three windows are now open:the Microfiche Magnification window in the left portion of your screen,the Fiche window in the upper right portion of your screen,and the Form List window in the lower right portion of your screen. THE MAGNIFICATION WINDOW The Microfiche Magnification window(see the name at the top of the window) provides a magnified view of some of the data in your address book. THE FICHE WINDOW The Fiche window contains the microfiche that is magnified in the Magnification window. The majority of the window contains the microfiche. Inside the box containing the microfiche,you will notice another box that is probably orange and black(depending on your color preferences). This box is your magnifying glass. Throughout the Quick Tour we assume that you are using the default colors of blue,white,black,and orange. If you are not,then just use your first color instead of blue,your second color instead of white, and so on. 1. Point at the magnifying glass with the mouse,push the left mouse button,and, while holding the button down,drag the mouse. Notice that the Magnification window is magnifying the area in the microfiche corresponding to the orange and black box! Now,watch the magnifying glass in the Fiche window change its size to match the size of the Magnification window as you do the following: 3-2 1. Pull the Magnification window to the top by clicking on the "Front" gadget in the upper right corner of the Microfiche Magnification window(the Front gadget is the one on the right). This exposes the "Size" gadget in the lower right corner of the Magnification window. Now grab the Size gadget by pointing at it with the mouse and holding down the left mouse button. Make the window vey small by moving the pointer towards the upper left corner of the window, then release the mouse button. 2. Change the size of the Magnification window back to approximately its previous size by grabbing the Size gadget and dragging. The Fiche window has two other features. The name of your current database is shown just above the microfiche. To the right of the microfiche is a scrollbar which is used to scroll through multiple pages of your fiche,if necessary. THE FORM LIST WINDOW The MFF Form List window is in the lower right portion of your screen and is partially obscured by the Magnification window right now. 1. Pull the MFF Form List window to the front by clicking on the Front gadget in the upper right corner of the MFF Form List window. The Form List window contains all of the forms that are available for viewing this database. Any time you see your data displayed,whether it is in the Magnification window or in other windows(which you will encounter soon),it is always displayed using a form that you have constructed. That way,you can decide how you wish to view your own data. Forms are also used for sorting and printing your data. In the Form List window,you see a number of boxes containing names. The first one which says Data Definition is special and will be dealt with later. Next, you see eight boxes,each with a description to its left indicating its function. These are called slots. You will soon find that dropping a form into one of these slots causes that form to be used for a particular purpose, depending on the particular slot. The form in the Display form slot is used for displaying your data in the Magnification window,for instance. Finally,you see several additional boxes containing names. These are currently unused forms. You can select forms from this list to drop into the slots. THE DISPLAY FORM Notice that each entry that you can see in the Magnification window has a person's name,home,and work phone number displayed. That is not all of the information that is in the database however! Notice that the slot next to Display form:contains Name and Phones. 1. Drag the Name and Address form onto the Display form slot by pointing at Name and Address,holding down the left mouse button,dragging that form up onto the Name and Phones form(being sure that the mouse pointer actually points to Name and Phones),and releasing the mouse button. 3-3 Now that your data is displayed using the Name and Address form. You will notice that the Magnification window now contains names and addresses instead of names and phone numbers. The phone numbers are still in the database but are simply not displayed right now. Simply change the Display form whenever you wish to change how the information is displayed in the Magnification window. THE SORT FORM Notice as you look down through the Magnification window that the names are all in alphabetical order. Also,notice that the slot next to Sort form: contains Names only. 1. Drag the Sort by State form onto the Sort form slot which is currently occupied by Names only. Now your data is sorted first by state,then by name. Feel free to drag the magnifying glass around to verify this. Since it is relatively difficult to locate information using the current Display and Sort forms,let's change them to more reasonable forms. 1. Use the Names only form as the Sort form by dragging it onto the Sort form slot which is currently occupied by Sort by State. 2. Use the Names only form as the Display form by dragging it onto the Display form slot which is currently occupied by Name and Address. Notice that a form can occupy more than one slot. There. Now it is much easier to find people The data that is displayed in the microfiche(and,of course,in the Magnification window)is always based on the current Display and Sort forms. You can change these at any time and the data is automatically sorted and redisplayed for you. THE EDIT FORM Changing the Edit form has no immediate effect,unlike changing the Display or Sort forms. The Edit form is used when you choose to edit a record. Let's bring up a record to edit;but,we will put it away without actually editing it: 1. Locate Albert Einstein by dragging the magnifying glass around until Albert Einstein shows up in the Magnification window. 3-4 2. Double chlick on the record containing Albert Einstein. This brings up the record editor. Notice that the Edit form(in the Form list window)is called Edit All and,by George,all of the information(including the phone numbers and notes about Albert Einstein)is available in the edit window,even though only the names are displayed in the microfiche! 3. Close the record editor by clicking on the "Close" gadget in the upper left corner of the Record Editor window. EDITING A RECORD Let's imagine that you wish to add Marcia Johnson's husband to your address book. He lives at the same address and they both work at MIT,but he has a different work phone number. 1. First,select Marcia Johnson's record by clicking on it. 2. Now you must choose the Copy Selected Items menu item from the Edit menu. (If you are not familiar with the use of menus,you should go back and read Appendix A-Concepts for New Users.)Here is a refresher on the use of menus anyway. Hold down the right mouse button,move the mouse pointer over the word EDIT up in the menu bar at the top of the screen,slide the mouse down until Copy Selected Items is highlighted,then release the button. Marcia Johnson's record has been copied. If the EDIT menu that includes Copy Selected Items doesn't show up when you hold down the right mouse button,it means that Microfiche Magnific- ation windown is not the "active" window.(If you don't know what "the active window" means,you should go back and read Appendix A - Concepts for New Users.)Activate the Microfiche Magnification window by clicking anywhere within it. You now see two identical records,one above the other. 3. Double click on one of the copies. This brings up the Record Editor again. 3-5 4. Marcia Johnson's husband's name is George. The last names are the same,so you need only change the first name. Click in the box in the Record Editor window that says Marcia. This selects the First Name field for editing. The fiel is highlighted and an orage cursor appears. 5. Press the ESC key. This clears the field. 6. Type the word George. 7. Now,we must change his work number. Click in the Work phone box. This one is now selected for editing. 8. His exchange is the same as his wife's,but the last four digits of his work phone number are different. So,skip past the exchange by pressing the RIGHT ARROW cursor key four times. The cursor is now on the digit 9. You should think of the cursor as being just before the digit,but after the - (minus character). This is important because,as you will see,when you type,the characters appear before the 9 and the rest of the line scoots over to the right to make room. 9. Type 12345. Woops! One too many digits. No problem. Press the BACKSPACE key to erase the last character that you typed. Any time you make a mistake typing, you can press the BACKSPACE key to erase the character just to the left of the cursor. 10. Now you must get rid of the four digits at the end of the line. Press the DEL key four times. The DEL key works like the BACKSPACE key except that it deletes the character that is under the cursor instead of the character to the left of the cursor. George is not a System Administrator,and he plays on your softball team,so you must change the notes about him. Previously to select a field to edit,you have clicked on it with the mouse. There is an alternative. 1. Press RETURN. This takes you to the next field. If you would like,you may press RETURN a few more times and watch as each field is selected in turn. Also try pressing SHIFT-RETURN. You may want to try TAB and SHIFT-TAB as well. 2. Now,select the Notes field by presssing RETURN as many times as necessary. 3. Since Geore is not a System Administrator,you must delete that note. However,he is your friend. So,instead of pressing ESC to clear the entire field as you did before,press SHIFT-DEL to delete the System Administrator line only. 4. Type PLAYS SOFTBALL,and press the ENTER key(NOT the RETURN key). This inserts a NEWLINE into your text. You can delete NEWLINE characters just as you would delete any other type of character. Try it now by pressing BACKSPACE. Then press the ENTER key again. 5. While you're here,you can try out the other cursor keys. Press each of them and you will see the cursor move up,down,left and right as you press each key in turn. When you get to the end of a line and press RIGHT ARROW the cursor 3-6 moves to the beginning of the next line. Conversely,pressing LEFT ARROW at the beginning of a line moves the cursor the end of the previous line. Don't worry if this seems awkward;it will eventually seem natural. 6. The only editing keys that you have not yet used are the SHIFT cursor keys. Try pressing each of them in turn and note that SHIFT-UP ARROW moves the cursor to the beginning of the field,SHIFT-DOWN ARROW moves it to the end,SHIFT-LEFT ARROW moves it to the beginning of the line,and SHIFT-RIGHT ARROW moves it to the end of the line. Whew! 7. Well,you're done editing this record. To save it,click on the Close gadget. This brings up a requester asking if you really want to save it or not. Click on the Save button. Your edited record has been placed back into the microfiche and everything has been sorted. You will find it preceding Marcia's record. EDITING A FORM Now that you are familiar with the use of forms for displaying and editing records,let's edit a form. You will copy an existing form and modify it to create a form called Home and Notes that will contain each person's name,home phone number,and some notes about him. 1. Select the Name and Phones form by clicking on it. 2. Choose Copy Selected Items from the Edit menu. The form has now been copied. 3. Look for the name co:Name and Phones. The co:means "copy of". So,the co:Name and Phones form is a copy of the original Name and Phones form. 4. Double Click on co:Name and Phones. This opens the Form Editor. The field at the top of the window is the form name. Each of the other boxes is a field that is displayed when this form is used. Also,notice that this window has a Size gadget in the lower right corner. You use this to control the size of the form. 3-7 EDITING THE FORM'S NAME 1. Press RETURN to select the form name. 2. Replace co:Name and Phones with Home and Notes. You may do this by pressing ESC,then type Home and Notes. DELETING FORM FIELDS To set up this new form that will consist of the name,home phone number,and notes,you must delete the work phone number and add the notes field. So... 1. Select the field that says Work:. When you selected this field,some funny looking gadgets popped up. Ignore them for the moment. 2. Choose Delete Field from the Edit menu. The Work:field has been deleted. 3. Select the field that says Work phone. 4. Choose Delete Field from the EDIT menu again. ADDING FORM FIELDS Well,that was the easy part. Now,you will add two fields,one that says Notes: (to prompt you later when you see data displayed in the form),and a second field that is the notes field itself. 1. First,you must make the form bigger so that there is room to work. Grab the Size gadget in the extreme lower right corner of the window and drag it until the window is approximately half the height of the screen. 2. Choose Add Field from the EDIT menu. This drops a new field into the window. THE FORM FIELD GADGETS When selected,each field in the forms editor contains several pieces of information. The left portion of the field contains some text that is either the field name or some descriptive text. This particular field contains some descriptive text. The word Description:is larger than the current size of the field. However,so that you can only see Descrip and a right arrow indicating that more text is to the right. Next to this text are four gadgets. They look like a diamond,a box,and an arrow. The diamond pictually two gadgets,one above the other. They may appear to be too small to work with,but you will find that you have no trouble once you get used to it. The Cycle Up gadget is a triangle(the top half of the diamond). Clicking on this gadget causes the field to cycle through each of the possible field names in this database. 3-8 The Cycle Down gadget is an upside down triangle(the bottom half of the diamond). Clicking on this gadget causes the field to cycle through each of the possible field names in this database in reverse order. These two gadgets together look like a diamond,but are actually two separate gadgets. The Drag gadget is a box. Grabbing this gadget and dragging the mouse allows you to position the field within the form. It works just like grabbing a window by the title bar and moving it around the screen. The Size gadget is an arrow pointing southeast. This gadget is just below the Drag gadget. Grabbing this gadget and dragging the mouse allows you to change the size of this field. It works just like the Size gadget at the bottom right corner of the window. USING THE GADGETS Now you will adjust the selected field's location and put the word Notes:into it. Then you will add another field,position it,and adjust it so that the Notes field is displayed in it. 1. First,put the words My notes:in the field instead of Description:by pressing ESC,then typing My notes:. 2. Grab the Drag gadget and drag the field slightly down and to the right,so that its left edge is aligned with the Home:field. The Drag gadget is the box at the upper right corner of the selected field. If you don't get it right the first time,just grab the Drag gadget again and readjust it. 3. Now,grab the Size gadget and size the field down until you can just see My notes:displayed. Don't worry if after sizing the field you only see otes:;the text has automatically been scrolled to the left because there wasn't quite enough room to display it all. 4. To see what the field will really look like when you are done,simply press RETURN to deselect it. If you made the field too small so that you see something like My not and a right arrow,simply select it,resize it,and deselect it again until you can read My notes:in the field. If you accidentally clicked on one of the Cycle gadgets and the orange cursor and the words My notes:disappeared and something like First Name or Notes appeared instead,don't panic. Just click repeatedly on one of the Cycle gadgets until My notes:reappears with an orange cursor. 5. Now you must add the actual Notes field to the form. Choose ADD FIELD from the EDIT menu. 6. Drag this field slightly down and to the right using the Drag gadget. 7. Grab the Size gadget and make this field large enough to accommodate three or four lines of text and as wide as the Home phone field. 8. Now instead of some text describing a field,you want the actual data field to be displayed in this box. Click on one of the Cycle gadgets(in the upper right corner of this field)several times until the word Notes appears in the field. 3-9 9. Grab the Form Editor window's Size gadget and shrink the window as much as you can. This actually changes the size of the form. Note that you cannot shrink the form beyond the boundaries of any of the fields in the form. 10. Make the form slightly larger(for aesthetic reasons)by grabbing the window's Size gadget again and dragging. 11. You're done! Click on the Close gadget in the upper left corner of the Form Editor window and choose Save in response to the requester. That may have taken several pages to describe,but it wasn't that hard,was it? Finally,let's see the fruits of your work. 1. Drag the Home and Notes form up to become the Display form in the Form List window. The Magnification window now displays the names,home phone numbers,and notes about each person in your address book. SELECTING RECORDS So far,you've seen only one thing selected at a time. Most of the time it only makes sense for one thing to be selected. However,there are several good reasons to select many records at a time. You may want to copy or delete a group of records,locate a group of records,or print a group of records. 1. Choose ALL from the SELECT menu. All of the records in your database are now selected(as you can see,they are all highlighted). 2. Choose DISPLAY TOTALS ON SCREEN from the PRINT menu. A window shows up using the Print Totals form and tells you that you have 25 records selected! 3. Click on the Close gadget of the Totals window. 3-10 4. Choose NONE from the SELECT menu. 5. Choose BY FIELD from the SELECT menu. This brings up the Selection Editor which offers you complete flexibility in selecting records. We won't go through all of the capabilities of the Selection Editor in the Quick Tour. See Chapter 14 - The Selection Editor for a complete list of its capabilities. Using the Selection Editor you can select records based on the data in each record such as: Records that contain the word friend in the Notes field. Records with Last Names less than G(meaning the names that occur before G in the alphabet). Records with number fields that are equal to,greater than,or less than some number(for dates or dollars,for instances). Records of people that live in Natick,Massachusetts. Records of friends that live in Natick,Massachusetts. And on and on... Let's try a couple of simple selections for now. See Chapter 14 - The Selection Editor for more details. 1. Select the Notes field and type the word friend. With this,you are asking the Selection Editor to find all of your friends,or at least all of the records in your address book with the word friend in the Notes field. 2. Click on the Close gadget of the Selection Editor. You now see that a number of records have been highlighted. 3. Choose DISPLAY TOTALS ON SCREEN from the PRINT menu to see how many have been selected. 4. Click on the Close gadget of the Totals window. So,you've found that you have nine friends in your address book. Let's find out how many friends you have in Massachusetts. 1. Choose NONE from the SELECT menu. This clears the list of selected records. 2. Choose BY FIELD from the SELECT menu. Notice that the word friend is still in the Notes field. 3. Select the State field and type MA. 4. Click on the Close gadget of the Selection Editor. You have now selected all records with the word friend in the Notes field AND the word MA in the State field. 3-11 PRINTING It is time to print. If you don't have a printer,skip this section for now and go right to the section titled Saving Your Database. You MUST have your printer installed correctly. Unfortunately,there is a bug in AmigaDOS that many cause the machine to crash if you have a printer installed as CUSTOM rather than using one of the other drivers(in the Workbench Preferences). If you are not sure,you should go and check now by moving the MFF windows out of the way so that you can get to your Preferences icon in your system disk window. PRINT OPTIONS Normally,before printing you should choose how you would like your data printed. You should choose a Print Record form and maybe choose a Print Title form and a Print Totals form. Then,you may wish to choose some Print Options. The print forms are already set up so you need only choose some Print Options for now. 1. Choose Edit Print Options from the PRINT menu. 2. Click in the box that says No title. 3. Click again in the box that says No title. It has changed to say Print title on first page only. 4. Click on the Close gadget of the Print Options Editor. 5. When you are asked about saving these options,choose Save. PRINTING 1. Make sure your printer is turned on. 2. Choose Print from the PRINT menu. Your printer will come to live! If something went wrong and your printer wasn't turned on or just won't print,don't worry. Just wait 30 seconds or so until a message comes up asking about it and choose CANCEL. Don't try printing again until you have made sure that your printer is installed correctly using the Workbench Preferences. Refer to your "Introduction to Amiga" manual about installing your printer. SAVING YOUR DATABASE You are done editing this address book for now,so let's save it. 3-12 1. Click on the Close gadget of the Microfiche Magnification window. 2. When you are asked about saving your database select SAVE. 3. Since you don't want to overwrite the original(this time),type new__so that the full name is new__address_book.mff and press RETURN. THE FILE VIEW After saving you will see the File View. You will also see the File View if you start MFF without a database. The File View is,as the name implies,a view of your database files. You can perform many of the same functions here that you can perform from the Workbench. You can copy,delete,and rename files,change to another directory(directory is just another name for drawer)to view its files, and so on. See Chapter 5 - The File View for a complete list of features. PICTURES 1. Double click on Pictures to change to the Pictures drawer. 2. Once the contents of the drawer have been displayed,double click on picture.mff to open a database of pictures. A picture database is just like a text database except that you cannot edit the pictures like you can edit text strings(this is not a paint program!). You can include any IFF format pictures(e.g. from your painting program or your video digitizing program)or icons(.info files)in your databases. Since pictures tend to be very large,which takes a lot of memory and makes it difficult to display many simultaneously,Microfiche Filer Plus has the capability of "squeezing" or "stretching" pictures to fit a box that you define. Microfiche Filer Plus can also squeeze the number of colors from 32 colors down to four or even two colors to save memory. 3-13 EDITING A PICTURE 1. Pull down the EDIT menu by holding down the right mouse button and moving the pointer up to the word EDIT. Notice that next to each menu selection there is an Amiga key and a letter. These are shortcut keys. Notice that next to ADD A BLANK RECORD is AMIGA KEY B. 2. Release the mouse button without choosing anything from the menu. 3. Hold down the RIGHT AMIGA key and press B. This adds a blank record to the database and takes you immediately to the RECORD EDITOR. 4. Choose EDIT THE PICTURE ATTRIBUTES from the PICTURE menu. 5. Type VOICE and press RETURN. MFF is now reading and squeezing a picture called voice. QUALITY SQUEEZING This picture doesn't appear to have been squeezed very well. It is not possible to read the black characters and it appears that some horizontal lines are missing. Well,you have control over some of this. 1. Click in the box that says QUICK SQUEEZE until it says QUALITY SQUEEZE. 2. Hit RETURN. MFF is rereading the picture,using a different squeezing algorithm. Well,it's different but not much better. Now that we're quality squeezing we can try to regain some of those thin lines by informing MFF that the background color is white. THE BACKGROUND COLOR This assumes that you are using the default colors of blue,white,black, and orange. If you are not,then just use your second color instead of white. 1. Choose white as the current color by clicking on the white box at the far left of the Picture Attribute Editor window. The orange frame will jump from the blue box to the white one indicating that white is the current color. 2. Click in the box with the X in it in the lower right corner of the Picture Attribute Editor window next to the box labeled BKGD. It is now white. 3. Hit RETURN. Notice that a great many details of this picture have been brough out by appropriately choosing a squeezing algorithm and background color! 3-14 COLOR TRANSLATION The last thing that need to be done is to bring out the true colors in this image. MFF is mapping the colors by contrast right now;it would be better for this particular image to map the colors by nearest color instead. 1. Click in the box that says MAP BY CONTRAST until says MAP BY COLOR. 2. Hit RETURN. Now,that is perfect! You will find that the first time you read a picture you may need to adjust these parameters until the picture looks just right. 1. Leave the PICTURE ATTRIBUTE EDITOR by hitting the close gadget in the upper left corner of the window. 2. When you are asked about saving the information,choose SAVE. DISPLAYING THE PICTURE IN FULL COLOR Now that we have set up the squeezing and color translation to bring out the details of this picture,let's see what the original picture looks like(in full, living color!). 1. Choose DISPLAY FULL PICTURE from the PICTURE menu. As you can see,we did manage to bring out all of the details of the original picture! 1. Get rid of the full color picture and return to the Picture Attribute Editor by clicking anywhere in the lower portion of the picture. 2. Keep this picture by clicking on the Close gadget of the Record Editor. 3. When you are asked about saving the record,choose Save. EDITING THE DATA DEFINITION You have probably noticed that this database is very plain. It only includes pictures. Perhaps you would like to add a description field to each record to describe where each picture can be found on your disks or who the artist is. To do this you must add a field to the Data Definition of your database. Each database has its own data definition,just as it has its own form list,and so on. 1. Double click on the Data Definition box in the Form List window. This brings up the Data Definition Editor. 3-15 2. Choose ADD FIELD from the EDIT menu. This adds a field to your database. 3. Press ESC and type THE PICTURE DESCRIPTION. This is the name of the field (which you will see when you build a form to display it). 4. Click on the Close gadget of the Data Definition Editor. 5. When you are asked about saving your changes,choose Save. So far,you have just added a field to the database. It is not yet displayed in any of your forms. So,let's edit the form to include this new field. 1. Double click on the THE BIG PICTURE form in the FORM LIST window. This brings up the now familiar Form Editor. 2. Make your form a little bigger by grabbing the Size gadget and dragging it down. Increase the height,but not the width of the field so that it is at least large enough to hold several lines of text at the bottom. 3. Select the field that says A Picture. 4. Grab its Drag gadget(the little box near the lower right corner of this field)and slide it down to the bottom of your form. 5. Choose ADD FIELD from the EDIT menu. 6. Make the newly added field larger by grabbing its Size gadget(in the lower right corner of the field)and making the field as wide as the pictue field and as high as you have room for. If you tried to make the field too big,you will get a requestor reminding you of this fact. Just choose OK and try again,being careful not to let the fields overlap. 7. Click on the Cycle gadgets in the upper right corner of this field until the words THE PICTURE DESCRIPTION show up. 3-16 8. Save this form by typing RIGHTAMIGA-X(remember those shortcut keys?). 9. When asked about saving the form,press RETURN(another shortcut key!). Your new field is now displayed in each record in the Magnification window. It may be hard to see because it is blank,but it is there! You may edit some records,filling in your new field,if you would like. PRINTING PICTURES If your printer cannot print pictures,skip this section and go right to the section titled Finishing Up. You MUST have your printer installed correctly. Unfortunately,there is a bug in AmigaDOS that may cause the machine to crash if you have a printer installed as CUSTOM rather than using one of the other drivers (in the Workbench Preferences). If you are not sure,you should go and check now by moving the MFF windows out of the way so that you get to your Preferences icon in your system disk window. 1. Point at the pictue of the Dragon,hold down the SHIFT key and click the left mouse button. This is called shift-clicking. 2. Point at the picture called Voice and shift-click again. Shift-clicking is a quick way to select a few records without using the Selection Editor. 1. Make sure your printer is turned on. 2. Choose PRINT from the PRINT menu. Your pictures are printed using some of your Workbench Printer Preferences. Some of the preferences that affect the printing of pictures:color vs. black & white vs gray scale and the left and right margins. FINISHING UP To quit without saving your changes: 1. Choose ABANDON CHANGES and EXIT to Workbench from the FILE menu. SUMMARY You have completed the Quick Tour! You now understand that a Microfiche Database consists of: a Data Definition that describes all of the fields and their types(text,number, or picture). 3-17 some forms that are used for displaying,editing,sorting,and printing your data. the records themselves. You have also found that by using Microfiche Filer Plus you can: quickly scan any database for the information you need. change the display criteria at any time and instantly redisplay your data. change the sorting criteria at any time and instantly reorder your data. easily edit any record in the database using forms that you design. select records for printing using simple mouse motions or complex selection criteria. print data any way you like using forms that you design. WHERE TO GO FROM HERE Perhaps the best way to proceed is to begin working on a database that you have in mind. Maybe you want to use the address book database to build your own address book. Or you may want to begin working on that idea you had. If you are going to build a database from scratch,read Chapter 4 - Creating a New Database. You may also wish to peruse some of the databases that are provided,including several databases of public domain software,pictures,and an invoicing database. You know enough now to get around easily;and,when you are stumped or simply care to learn about some more features of MFF,you should refer to the table of contents and the index of this guide to find the information that you need. 3-18 CREATING A NEW DATABASE CHAPTER 4 In this chapter,we will describe how to create a database from scratch. It is assumed that you are basically familiar with Microfiche Filer Plus. In particular,it is assumed that you have gone completely through Chapter 3 - The Quick Tour. If you have not gone completely through the Quick Tour before attempting to create your own database,you will likely have trouble understanding this chapter. You will get no sympathy from us with questions about this chapter unless you have read(and performed!) the Quick Tour! If you wish to create a new database that is similar to one that already exists, you should simply copy the original database(using the Copy function in the File View). Then edit the copy,deleting those records,fields,and forms that you don't need. This is the easiest way to get started. If you wish to create a completely new database,unlike any other at your disposal,you will need to do the following: 1. Spend a few minutes thinking about what you would like to store in this database and how to break that information down into a number of fields. 2. Create an empty database. 3. Set up your Data Definition. 4. Set up your Forms. 5. Enter your data. That's all there is to it! Oh,you wanted more details? Ok. CREATING A NEW DATABASE The first thing to do is to create a new database. 1. Start MFF(with no database)from the Workbench or CLI. 2. Change to the directory in which you wish to store this new database. 4-1 3. Choose CREATE A NEW DATABASE from the FILE menu. This sets up a database with one Text field,one Form displaying that Text field,and one Record. SETTING UP A DATA DEFINITION Now that you have opened a new database,you must set up the fields that each record will contain. You do this in the Data Definition Editor. 1. Open the Data Definition Editor by double clicking on the Data Definition button in the Form List window. 2. Add as many new fields as you will need in your database by choosing Add Field from the EDIT menu. 3. Change the field names to something more appropriate by clicking in each field name and typing a new name. 4. Change the field types,if necessary,by clicking in each field type until the appropriate type shows up. If you are only using Text fields,this step is not necessary. 5. Exit and save your new Data Defintion by clicking in the close gadget in the upper left corner of the window. SETTING UP THE FORMS Now that your Data Definition is set up,you must set up forms for displaying, sorting,printing,and editing your data. 1. Set up the Edit All form by editing the Default Form and changing it to display all of your new fields. Double click on the Default Form in the Form List window. 2. Change the name of the form to Edit All. 3. Make the form much larger by grabbing the size gadget in the lower right corner of the window and dragging it. 4. Add two fields for each field in the Data Definiion by choosing ADD FIELD from the EDIT menu. 5. Organize the fields into two columns by grabbing the drag gadget of each field and dragging it into position. 6. In each left hand field,type the name of a field in your Data Definition. In each field in the right hand column,cycle through the field names(by clicking on the cycle gadgets)until you find the name corresponding to the name on the left. 7. Order your fields for clean editing by choosing ACROSS THEN DOWN from the ORDER menu. 4-2 8. Exit and save your new form by clicking in the close gadget in the upper left corner of the window. Now that you have set up your Edit All form,you probably want to set up some smaller forms for displaying and printing. 1. Copy the Edit All form in the Form List window. 2. Double click on the new form titled co:Edit All in the Form List window. 3. Select fields and delete them by choosing DELETE FIELD from the EDIT menu. 4. Drag fields around,making your form look beautiful! 5. Save it. 6. Do this again,if you like,creating a list of forms for your use later. Now that you have built a number of forms,you may want to drop them into different slots for use when displaying,printing,and so on. SAVING THE DATABASE Save the database by choosing SAVE DATABASE from the FILE menu.(After doing all that work it would be a shame to lose everything if the power went out!) ENTERING DATA The only thing missing in your database now is the data! 1. Add a blank record by choosing ADD A BLANK RECORD from the EDIT menu. 2. Enter the data. 3. Save the data and add another blank record by choosing SAVE AND EDIT BLANK RECORD from the EDIT menu. 4. When you are done,just save the record by clicking in the close gadget in the upper left corner of the window. You may wish to read the section titled Quick Data Entry in Appendix C - Tips and Shortcuts for some extra tips on extremely quick data entry methods. 4-3 CHAPTER 5 - THE FILE VIEW Microfiche Filer Plus has two basic views of the world:the File View and the Data View. The File View is a window into your disk directory;the Data View is a window into your database. When you start Microfiche Filer Plus by either double clicking on the MFF icon or by typing MFF from the CLI,you are shown the File View. Here,you are shown a list of files in a directory(directory is just another name for drawer). You can manipulate these files in many of the same ways that you manipulate files from the Workbench or the CLI. You can copy,rename,and delete files;you can change directories(equivalent to opening a drawer)and create new directories;and you can open databases. THE FICHE WINDOW The Fiche window(in the upper right corner of your screen)displays a miniaturized view of the file list. This is the microfiche. The orange and black box(assuming that you are using the default colors)represents the size and location of your magnifying glass. By grabbing this box with the mouse and dragging it around,you can see different parts of your file list magnified in the Microfiche Magnification window. 5-1 The Fiche window's size is determined by the current setting of the microfiche size preference. It may be full size(approximately 120 lines of text),half size(approximately 60 lines of text),or one third size(approximately 40 lines of text). The default size is one third. You may wish to increase this if you have additional memory in your machine and wish to scan more records at once than the one third size allows. See Chapter 16 - Preferences for more information about changing the size of the microfiche. THE MAGNIFICATION WINDOW The Magnification window shows you a magnified view of the microfiche. It is your magnifying glass. When you are viewing a directory(or drawer)of files, three important pieces of information can be seen in this window. Current Directory The directory(or drawer)that is being displayed. File Name The names of files and directories that are in the current directory. File Type The type of each file. FILE TYPES Microfiche Filer Plus classified into four types:Database,Directory,Parent Dir, and Other. Note that normally you do not see Other files. If you would like to see files other than Database files and Directories,you can use the Preferences Editor to set the file display preference to Display ALL files. DATABASE FILES Any filename that ends with .mff is considered a Database file. You can copy, rename,and delete Database files. You can also open a Database file(which takes you to the Data View)and you can copy its Data Definition. DIRECTORIES Any directories inside the current directory(called subdirectories)are marked Directory. You can rename and delete Directories;but you cannot copy them. You can also open a Directory(which is identical in effect to Changing Directories) and you can make a new Directory. PARENT DIR The Parent Dir is simply the parent of the current directory(or the directory that contains the current directory). See the section titled THE DIRECTORY TREE for a more through description of directories and their parents. You can only open(or change to)the Parent Dir. You cannot rename or delete it. 5-2 OTHER FILES Microfiche Filer Plus only displays Other files if you have changed the file display preference to Display ALL files using the Preferences Editor. You do not normally see Other files. You can copy,rename,and delete Other files. SELECTING A FILE You must select a file before performing an operation on it. There are two ways to select a file. Normally you point at it and click. If you don't want to touch the mouse,you may press one of the NEXT FIELD and PREVIOUS FIELD keys (such as TAB,SHIFT-TAB,or RETURN)to cycle through the file list until the file that you are interested in is selected. The selected file is always highlighted. If nothing is highlighted,nothing is currently selected. THE DIRECTORY TREE An Amiga diskette is organized as a tree. Simply put,this means that you can have directories inside of directories. From the Workbench you are familiar with the idea of opening a drawer and finding several other drawers inside,each of which you can also open. The File View shows you only one directory at a time. By "changing directories" you can move up and down the directory tree,to the current directory's parent or children. CHANGING DIRECTORIES If you wish to view the files in a directory other than the current one,you must "change directories". There are three ways to change directories: The most common way is to simply double click on the directory;this takes you immediately to it and displays its file list. This is the easiest way to move up and down the directory tree. The second way is identical in effect to the first,but you can do it without using the mouse. First,select the directory(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose OPEN SELECTED ITEM from the FILE menu. The third way must be used if you wish to view a directory on another disk. Choose CHANGE DIRECTORY from the FILE menu,then type the name of the disk or directory that you wish to see. It is acceptable to type things like RAM: or Microfiche Filer Plus: or DF1:my_new_directory. 5-3 MAKING NEW DIRECTORIES You can make a new directory by choosing MAKE DIRECTORY from the FILE menu. If you type a directory name,a directory is created inside of the current directory. For instance, you may type newdir which creates a directory inside the current one,so that when the file list is redisplayed you will see your new directory. You may also type a full path name which places the directory anywhere you would like. An example of a full path name would be RAM:Mydir/newdir. The directory RAM:Mydir must already exist,and,if so,the directory newdir is created inside it. Note that an associated icon file(with the same but the extension .info)is also created as long as you have the Workbench vs. CLI preference set to Workbench. This is so that you can see the new drawer from the Workbench. If you have the Workbench vs. CLI preference set to CLI instead,no icon file is created. If you exclusively use the CLI,you should use the CLI option so that your directories don't become cluttered with icon files. COPYING FILES You can copy Database files and Other files. You cannot copy Directories. To copy a file: 1. Select the file(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). 2. Then choose COPY SELECTED ITEM from the FILE menu. A requester then shows up asking you for the new filename. If you type a simple filename such as newfile,the file newfile is created in the current directory. You may also give a full directory and filename such as RAM:newfile and the file newfile is created in RAM: instead of in the current directory. If newfile already exists,you are asked if you want it to be deleted. If you choose Yes,the original file is not really deleted but is copied to newfile.BAK and newfile is then created. Of course,if you choose Abort the copy is aborted and your files are not touched. Copying a Database file is identical to copying an Other file,except that you can only cpy it to a filename with .mff as its extension. For instance,copying a Database file to the name newdatabase is not allowed;it must be copied to the name newdatabase.mff instead. Note that the associated icon file is always copied if one exists. If you are copying a database,an icon file is created,even if one didn't previously exist,as long as you have the Workbench vs. CLI preferences set to Workbench. If you have it set to CLI,no icon file is created. 5-4 COPYING DATA DEFINITIONS You can copy the Data Definition of Database files only. This is used to copy te structure of a database and all of its forms that you have built without copying all of the data. For instance,you may have built an address book of friends and relatives and you now want to build an address book of business clients. You would copy the Data Definition of your address book (which gives you essentially an empty database),then begin work on your business client address book. To copy a Data Definition,select the Database file that you wish to copy(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose COPY SELECTED DATABASE DEFINITION from the FILE menu. Note than an icon file is also created if you have the Workbench preference selected. If you have the CLI preference selected instead,no icon file is created. DELETING FILES You can delete Database files,Other files,and Directories,but not the Parent Dir. To delete a Database file,an Other file,or a directory,select the one that you wish to delete(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose RENAME SELECTED ITEM from the FILE menu. A requester shows up asking you for the new filename. If you type a simple filename such as renamed_file,the file's name is changed to renamed_file. If you type a directory name,the file is moved to the new directory. If you type a directory and filename such as:anotherdir/renamed_file the file's name is first changed to renamed_file,then moved to the directory :anotherdir. You can only move a file to another directory on the current disk. You cannot move files from one disk to another using the Rename function. Renaming a Database file is identical to renaming an Other file or a Directory, except that you can only rename it to a filename with .mff as its extension. For instance,renaming a Database file to the name renamed_database is not allowed; it must be renamed to the name renamed_database.mff instead. The associated icon file is also renamed,if one exists. 5-5 CREATING A NEW DATABASE If you wish to create a database and begin building it from scratch,choose CREATE A NEW DATABASE from the FILE menu. This provides you with a database with one text field,one form,and one record. You are immediately shown the Data View of this database. You may go from there,building your Data Definition and forms,and filling in your data. See Chapter 4 - Creating a New Database for more information. OPENING AN EXISTING DATABASE There are two ways to open a Database file. The easiest way is to simply double click on the Database file. The second way is identical in effect to the first,but you can do it without using the mouse. First,select the Database file(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose Open Selected Item from the FILE menu. You are immediately shon the Data View of this database. See Chapter 6 - The Data View for more information about scanning,editing,and printing your database. OPENING THE WORKBENCH SCREEN When MFF is started on a separate screen,it closes the Workbench screen to save memory. If you wish to reopen the Workbench(to open a CLI. for instance)choose OPEN THE WORKBENCH SCREEN from the FILE menu. To get back to the Microfiche Filer Plus screen,click on the "screen to back" gadget in the upper right corner of the Workbench screen. RUNNING A MACRO If you wish to enter and run a macro,choose EDIT & RUN MACRO from the MACRO menu. This brings up a requester asking you to type in a macro(or enter then name of a macro file). Enter the information and click on the RUN MACRO button. If you want to run the macro again,choose RUN MACRO from the MACRO menu. This runs the macro immediately,without prompting you for the name again. See Chapter 17 - Introduction to Macro Programming for more information about macros. LEAVING There are two ways to leave Microfiche Filer Plus. The first way is to simply click on the Close gadget in the Microfiche Magnification window. The second way is identical in effect to the first and is to choose EXIT TO WORKBENCH from the FILE menu. Microfiche Filer Plus then closes all of its windows and returns you to either the Workbench or to the CLI. If you are returing to the CLI,Microfiche Filer Plus returns you to the directory where you were when you started MFF. 5-6 CHAPTER 6 - THE DATA VIEW Microfiche Filer Plus has two basic views of the world:the Data View and the File View. The Data View is a window into your database;the File View is a window into your disk directory. THE FICHE WINDOW The Fiche window(in the upper right corner of your screen)displays a miniaturized view of your data. This is the microfiche. The orange and black box(assuming that you are using the default colors)represents the size and location of your magnifying glass. By grabbing this box with the mouse and dragging it around,you can see different parts of your database mangnified in the Microfiche Magnification window. The Fische window's size is determined by the current setting of the microfiche size preference. It may be full size(approximately 120 lines of text),half size(approximately 60 lines of text),or one third size(approximately 40 lines of text). The default size is one third. You may wish to increase this if you have additional memory in your machine. See Chapter 16 - Preferences for more information about changing the size of the microfiche. Above the microfiche in the Fiche window is the name of the database that you are viewing. 6-1 THE SCROLLBAR To the right of the microfiche in the Fiche window is a scrollbar. If all of your data does not fit into the microfiche,the scrollbar becomes active. The white,outer box represents all of your data;the size and location of the orange,inner box represents the amount of data that is currently displayed and approximately where in the list of records the displayed list begins. For instance,if you have a database of 100 records and only 30 can be displayed at once,the orange box is approximately one third the size of the white box. If it is the first 30 records that are being displayed,the orange box is located at the top. If it is the last 30 records that are being displayed,the orange box is located at the bottom. There are two ways to scroll through a large database: You can scroll through your database one page at a time by clicking inside the white box but above or below the orange box to page up or down respectively. For instance,if the first 30 records are displayed of your 100 record database (records 1 to 30),the orange box is at the top. You click below the orange box again and the next 30 records are displayed(records 61 to 90). And so on. You can scroll through your database by amounts larger or smaller than a page by grabbing the orange box with the mouse,dragging it,then releasing the mouse button. This is a very convenient way to jump from the top to the bottom of a very large database. Instead of moving down one page at a time,you can just drag the orange box from the top to the bottom,which causes the last 30 records (in the example above)to be displayed. THE MAGNIFICATION WINDOW The Magnification window shows you a magnified view of a small portion of the microfiche. It is your magnifying glass. When you are viewing your database,you can see your database records in this window. The records are displayed in order according to your current Soft form,your current case significant preference,and your current Sort order preference. The format of each displayed record is determined by your current Display form. The records are either displayed across the screen or down the screen,based on your current data display order preference. Seee Chapter 7 - The Form List Window for more information about the Display form and the Sort form. See Chapter 16 - Preferences for more information about the case significant, sort order,and data display order preferences. ADDING BLANK RECORDS You can add a blank record to your database by choosing ADD A BLANK RECORD from the EDIT menu. 6-2 The blank record is added to the end of the record list and you are taken directly to the Record Editor so that you can enter data into this record. SELECTING DATA To perform most operations on your data you must first select the record or records on which to operate. Editing a record requires exactly one record to be selected. Other operations like copying,deleting,and printing allow you to use a list of records. SELECTING A SINGLE RECORD There are two ways to select a single record: The easiest way is to simply click on the record. The second way allows you to select a record without using the mouse. Simply use the NEXT FIELD and PREVIOUS FIELD keys. If nothing is yet selected,pressing one of the NEXT FIELD keys selects the first record in your database. Pressing one of the NEXT FIELD keys again selects the next one. Pressing one of the PREVIOUS FIELD keys selects the one just before it. The NEXT FIELD keys are TAB and either RETURN or ENTER(depending on your RETURN vs ENTER preference). The PREVIOUS FIELD keys are SHIFT- TAB and either SHIFT-RETURN or SHIFT-ENTER(depending on your RETURN vs ENTER preference). See Chapter 8 - Editing and Shortcut Keys for more information on the NEXT FIELD and PREVIOUS FIELD keys. See Chapter 16 - Preferences for more information on the RETURN vs ENTER preference. Note that the Microfiche Magnification window must be activated before using the NEXT FIELD and PREVIOUS FIELD keys. If the Form List window is the active window,for instance,pressing the NEXT FIELD key selects the next form instead of the next record! See Appendix A - Concepts for New Users for more information about the active window. Note that using either of these methods to select a single record automatically deselects all other records. SELECTING A LIST OF RECORDS There are three ways to select a list of records: The first way is to simply shift-click on each record that you would like to select. Shift-clicking on each record leaves all other selected records alone and adds the new one to the list. This contrasts with clicking on each record which deselects all other selected records. See Appendix A - Concepts for New Users for more information about shift-clicking. 6-3 The second way allows you to select all of the records in the database. Simply choose All from the SELECT menu. This immediately selects all of the records in the database(whether they are currently displayed or not). The third way is the most complicated,but the most powerful way to select a list of records. Use the Selection Editor by choosing By Field from the SELECT menu. This allows you to select a list of records based on the information in the records' fields. You could select all of the people in Massachusetts,for instance. Or you can be even more clever and select all of the people in Massachusetts with home phones but no work phones with last names for A to M. See Chapter 14 - The Selection Editor for more details. You can also deselect all of your records by choosing None from the SELECT menu. This allows you to start with a clean slate when selecting by field,for instance. GROUPING SELECTED RECORDS For easy scanning of your selected records,you may group them together by choosing Move Selected Items to Front from the SELECT menu. This moves all of your currently selected records to the front of your database. SORTING RECORDS If you have set your sort order preference to either Sort in ASCENDING order or Sort in DESCENDING order,your data is kept in sorted order automatically for you. If ,however,you have set your sort order preference to Don't sort,you must explicitly ask MFF to sort your data by choosing Sort from the SELECT menu. See Chapter 16 - Preferences for more information about the Sort order preference. EDITING RECORDS To edit a record you must "open" it. Opening a record brings up the Record Editor which allows you to edit your record. There are two ways to open a record. The easiest way is to simply double click on the record in the Magnification window. The second way is identical in effect to the first,but you can do it without using the mouse. First,select the record(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose OPEN SELECTED ITEM from the EDIT menu. The Record Editor window appears and allows you to edit your record based on the current Edit form. See Chapter 11 - The Record Editor for more information about editing a record. 6-4 COPYING RECORDS To copy a record: 1. Select the record or records(by using any of the record selection methods). 2. Then choose COPY SELECTED ITEMS from the EDIT menu. Each copied records is added to the end of the database;then,if you have set the Sort order preference to eith Sort in ASCENDING order of Sort in DESCENDING order,the database is sorted and redisplayed. DELETING RECORDS To delete one or more records,first select them(using any of the record selection methods). Then choose DELETE SELECTED ITEMS from the EDIT menu. You are asked if you really meant to do this. If you choose Delete,the records are deleted;if you choose Don't,they are not. PRINTING To print a list of records: 1. Set up the print forms in the Form List window. See Chapter 15 - Printing for more information about the use of the print forms when printing. 2. Select the list or records that you want to print(using any of the record selection methods). 3. Choose printing options by choosing EDIT PRINT OPTIONS from the PRINT menu. 4. Print them by choosing PRINT from the PRINT menu. See Chapter 15 - Printing for more information about printing. DISPLAYING TOTALS When printing,one of your options is to display totals. You may find that you want to display totals without having to print. To display totals on the screen: 1. Set up the Print Totals form in the Form List window. See Chapter 15 - Printing for more information about the use of the Print Totals form when printing. 2. Select the list of records that you want to total(using any of the record selection methods). 3. Choose DISPLAY TOTALS ON SCREEN from the PRINT menu. 6-5 A window opens and displays the totals,just as if you printed them. See Chapter 15 - Printing for more information about totals. SAVING THE DATABASE At any time,you can save your database. If you are making many changes to a database,it is prudent to save them to your disk periodically. That way,if the power goes out,you won't lose your work. To save your database,choose Save Database from the FILE menu. A requester shows up asking you for the filename. If you have already given this database a name,that name is already displayed in the requester. Simply choose SAVE if you want to save the database using the old name. Before saving the database,Microfiche Filer Plus renames the old database to database_file.mff.BAK(database_file.mff is created in :anotherdir instead of in the current directory. If database_file.mff already exists,you are asked if you want it to be deleted. If you choose Yes,the original file is not really deleted but is copied to database_file.BAK and database_file is then created. Of course,if you choose ABORT the save is aborted and your files are not touched. Note that the filename field in the requester is a text field like the text fields in the Record Editor. This means that you can use all of the familiar text editing keys to edit the filename. See Chapter 8 - Editing and Shortcut Keys for more information on editing keys. LOADING PICTURES If you are editing a database that includes pictures but the pictures are not yet loaded,you may select and load a number of pictures at once. To load a number of pictures: 1. Select the list of records that you want to load(using any of the record selection methods). 2. Choose LOAD SELECTED PICTURES from the FILE menu. RECOMPUTING CALCULATED FIELDS Calculated fields are normally computed automatically as you enter the information. However,there may be times when they have not yet been computed. You may explicitly ask for all of the calculated fields in the database to be recomputed by choosing RECOMPUTE ALL CALCULATED FIELDS from the FILE menu. 6-6 OPENING THE WORKBENCH SCREEN When MFF is started on a separate screen,it closes the Workbench screen to save memory. If you wish to reopen the Workbench(to open a CLI,for instance)choose OPEN THE WORKBENCH SCREEN from the FILE menu. To get back to the Microfiche Filer Plus screen,click on the "screen to back" gadget in the upper right corner of the Workbench screen. RUNNING A MACRO Microfiche Filer Plus allows you to store up to nine macros in each database. These macros are accessible through the MACRO menu or through the macro keys RIGHTAMIGA-1 through RIGHTAMIGA-9 and SHIFT-RIGHTAMIGA-1 through SHIFT-RIGHTAMIGA-9. If you wish to enter and run macro 1,for instance,choose EDIT & RUN MACRO 1 from the MACRO menu. This brings up a requester asking you to type in a macro(or enter the name of a macro file). Enter the information and click on the RUN MACRO button. If you want to run the macro again,choose RUN MACRO 1 from the MACRO menu. This runs the macro immediately,without prompting you for the name again. See Chapter 17 - Introduction to Macro Programming for more information about macros. LEAVING There are two things to think about when you wish to leave the Data View. You must decide whether you want to Exit and save all of your changes or whether you want to Abandon any changes you have made. You must decide whether you want to end up in the File View or back at the Workbench after leaving the Data View. Here are the five combinations: The most common way is to simply click on the Close gadget in the Microfiche Magnification window. If you have made any changes to your database,you are prompted to save your database. Then,you are taken to the File View. The second way is identical in effect to the first and is to choose EXIT TO FILE VIEW from the FILE menu. If you have made any changes to your database, you are prompted to save your database. Then,you are taken to the File View. The third way is to choose ABANDON CHANGES AND EXIT TO FILE VIEW from the FILE menu. If you have made any changes to your database,you are asked if you would really like to abandon your database. If you answer ABANDON,all of your changes are lost. Then,you are taken to the File View. 6-7 The fourth way is to choose EXIT TO WORKBENCH from the FILE menu. If you have made any changes to your database,you are prompted to save your database. Microfiche Filer Plus then closes all of its windows and returns you to either the Workbench or to the CLI. If you are returning to the CLI,Microfiche Filer Plus returns you to the directory where you were when you started MFF. The fifth way is to choose ABANDON CHANGES AND EXIT TO WORKBENCH from the FILE menu. If you have made any changes to your database,you are asked if you would really like to abandon your database. If you answer ABANDON,all of your changes are lost. Microfiche Filer Plus then closes all of its windows and returns you to either the Workbench or to the CLI. If you are returning to the CLI,Microfiche Filer Plus returns you to the directory where you were when you started MFF. EMERGENCY SAVE AND EXIT Occasionally,it is possible to use up all of the memory in the Amiga. Microfiche Filer Plus is pretty good about not letting this happen,but it is possible,especially if you are running another program at the same time. When this happens,you may not be able to save your database. You should first try to free some memory by stopping other programs,deleting unneeded windows,and shrinking other windows. If this doesn't help,it is time for the EMERGENCY SAVE AND EXIT! Choose EMERGENCY SAVE AND EXIT from the EMERGENCY menu. All of the windows are closed and MFF frees as much memory as it can. The final task of MFF is to save your database. YOU CANNOT GET BACK FROM HERE! You can save your database or you can abort,but you cannot get back into MFF. You give the filename or you can abort,but you cannot get back into MFF. You give the filename just as you would if you were leaving normally and it is saved. After saving the database,MFF returns you to the Workbench or to the CLI. 6-8 The MFF Form List window appears in the bottom right corner of your screen whenever you are shown the Data View by opening a database. It disappears when you leave the Data View and return to the File View. "Forms" are simply templates that are used to display your data. You can construct a large number of forms,even though you may only use a small number of them at any one time. All of your forms are listed in the Form List window. The first item in the Form List window is the Data Definition button. It is kept here for lack of a better place. Double clicking on this button opens the Data Definition Editor. Next,you see eight boxes,each with a description to its left. These are called "slots". Dropping a form into one of these slots causes that form to be used for a particular purpose,depending on the particular slot. The form in the Display form slot is used for displaying your data in the Magnification window, for instance. Finally,you see several additional boxes containing names. These are currently unused forms. You can select forms from this list to drop into slots. At the far right is a scrollbar. It is only active when there is more information to be displayed than can fit in the window. THE DATA DEFINITION BUTTON There are two ways to open the Data Definition Editor: The easiest way is to simply double click on the Data Definition button. The second way is identical in effect to the first,but you can do it without using the mouse. First,select the Data Definition button(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose OPEN SELECTED ITEM from the EDIT menu. Note that the Form List window must be activated before using the NEXT FIELD and PREVIOUS FIELD keys. If the Microfiche Magnification window is the active window,for instance,pressing the NEXT FIELD key selects the next record instead of the next item in the Form List window! See Appendix A - Concepts for New Users for more information about the active window. 7-1 The Data Definition Editor appears and allows you to edit your Data Definition. See Chapter 9 - The Data Definition Editor for more information about editing the Data Definition. MOVING FORMS Moving forms around is the most common operation in the Form List window. Most often you want to drop a new form into one of the eight slots at the top of the window. Sometimes you want to move a form up in the list. You would do this if the Form List window is too small and you cannot drag a form up into a slot in one movie;so,you scroll the window down until you can see the form that you want to move,move the form up by swapping it with another form,then scroll the window up,then drop the form into the slot. To drop a form into one of the eight slots at the top,simply grab the form with the mouse,drag it until the pointer points at the slot,then drop it. To swap two forms that are not currently used(that are not in one of the eight slots),simply grab one of them with the mouse,drag it until the pointer points at the other one,then drop it. THE DISPLAY FORM The current Display form is used to display the data in the microfiche. If you drop a new form into the Display form slot,the database is redisplayed using this new form. Any time you edit this form,the database is also redisplayed. THE EDIT FORM The current Edit form is used when you edit a database record. If you drop a new form into the Edit form slot,the next time you edit a record,the new form is used. THE SORT FORM The current Sort form is used to sort the data in the database. If you drop a new form into the Sort form slot,the database is sorted using this new form,the redisplayed(unless your sort order preference is set to Dont sort). Any time you edit the Sort form,the database is also sorted and redisplayed. If you have set the sort order preference to Don't sort,you may sort your data by choosing Sort from the SELECT menu. The database is sorted based on the order of the fields in the Sort form. If the Sort form is empty contains no fields),the database is not sorted. If the Sort form contains a single field,the database is sorted based on that one field. If the Sort form contains more than one field,the database is sorted based on the first field,then the second,and so on. Read the section titled Ordering fields. See Chapter 10 - The Form Editor for more information about ordering the fields in a form. There are two preferences that are used when sorting the database. 7-2 The case significant preference determines whether uppercase and lowercase letters should be considered the same or not. If you have set Dictionary sort and search,'a' and 'A' are the same and the letter 'a' comes before the letter 'Z' as you would expect. If you have set ASCII sort and search 'a' and 'A' are not the same and the letter 'Z' comes before the letter 'a' because uppercase letters come before lowercase letters. The sort order preference determines whether the data is sorted in ascending order,descending order,or not sorted at all. If this preference is set to Don't sort,your data is never sorted. If this preference is set to Sort in ASCENDING order,then 'A' comes before 'Z' and 10 comes before 20. If this preference is set to Sort in ASCENDING order,the 'Z' comes before 'A' and 20 comes before 10. THE PRINT FORMS The current Print Forms,Print Title form,and Print Totals form are used when you print your database. More precisely,Print Form 1 is always used,and Print Form 2,Print Form 3,the Print Title form,and the Print Totals form may be used depending on your print options. The Print Totals form is also used when you Display Totals on Screen. See Chapter 15 - Printing for more information about the use of the print forms when printing. ADDING BLANK FORMS You can add a blank form to your Form List by choosing ADD A BLANK FORM from the EDIT menu. The blank form is added to the end of the form list and you are taken directly to the Form Editor so that you can construct the form. EDITING FORMS To edit a form you must "open" it. Opening a form brings up the Form Editor which allows you to edit your form. There are two ways to open a form: The easiest way is to simply double click on the form in the Form List window. The second way is identical in effect to the first,but you can do it without using the mouse. First,select the form(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose OPEN SELECTED ITEM from the EDIT menu. The Form Editor window appears and allows you to edit your form. See Chapter 10 - The Form Editor for more information about editing a form. 7-3 COPYING FORMS To copy a form: 1. Select the form(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). 2. Then choose COPY SELECTED ITEMS from the EDIT menu. The copied form has the letters co:prepended to the form name so that you end up with something like co:Old_Form. The co:means "copy of". The copied form is inserted into the list immediately following the original form. DELETING FORMS To delete a form,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose DELETE SELECTED ITEMS from the EDIT menu. You are asked if you really meant to do this. If you choose Delete,the form is deleted;if you choose Don't,it is not deleted. THE SCROLLBAR At the far right of the Form List window is a scrollbar. If all of your forms do not fit into the window,the scrollbar becomes active. The white,outer box represents all of the forms;the size and location of the orange,inner box represents the number of forms that are currently displayed and approximately where in the list of forms the displayed list begins. For instance,if you have 30 forms and only 10 can be displayed at once,the orange box is approximately one third the size of the white box. If it is the first 10 forms that are being displayed,the orange box is located at the top. If it is the last 10 forms that are displayed,the orange box is located at the bottom. There are two ways to scroll through a large form list: The most convenient way to scroll through the form list is to grab the orange box with the mouse and drag it until you find what you are looking for. Unlike the scrollbar in the Fiche window,dragging this scrollbar causes the window to scroll immediately! You can also scroll through your form list one page at a time by clicking inside the white box but above or below the orange box to page up or down respectively. For instance,if,of 30 forms in the list the Data Defintion button and the first 9 forms are displayed in the window,then the orange box in the scrollbar is at the top. If you click below the orange box the next 10 forms are displayed. And so on. 7-4 CHAPTER 8 - EDITING AND SHORTCUT KEYS After you have become familiar with Microfiche Filer Plus,you may find it inconvenient to continuously move your hands from the keyboard to the mouse. This chapter describes all of the keyboard shortcuts and editing keys that you can use while in Microfiche Filer Plus. EDITING KEYS FOR TEXT EDIT FIELDS This section describes all of the keys that you can use in Text Edit Fields. Text Edit Fields are used in many windows of MFF. Any field that you can type text into is a Text Edit Field. Text Edit Fields appear in the Record Editor, the Form Editor,the Data Definition Editor,the Selection Editor,the Preferences Edito,the Print Options Editor,and in filename requesters. INSERTION KEYS Pressing any of the normal typewriter keys inserts that character into the text. The character is inserted just before the cursor. Pressing the NEWLINE key inserts a NEWLINE character into the text just before the cursor. The NEWLINE character is a character just like any other,except that it causes the cursor to move onto the next line,just like a word processor. Unsing the NEWLINE key,you can enter many lines of text into a single field. An example of this is the Notes field in the address book database that you used in the Quick Tour. You actually entered several lines of descriptive text about each person into a single field. You won't fine a NEWLINE key on your keyboard. This is because either the ENTER key or the RETURN key is used as the NEWLINE key,depending on your RETURN vs. ENTER preference selection. You normally use the ENTER key for inserting NEWLINEs but some people prefer to use the RETURN key instead. See Chapter 16 - Preferences for more information about the RETURN vs. ENTER preference. CURSOR MOVEMENT KEYS Pressing any of the four cursor keys(UP ARROW,DOWN ARROW,LEFT ARROW,and RIGHT ARROW)moves the cursor in the direction specified. The cursor only moves over text that is already in the field. It stops at the beginning of your text and at the end of your text. If you want to move beyond the end of your text you must insert spaces. 8-1 This may seem counterintuitive at first,but if you press the RIGHT ARROW key when you are at the end of a line,the cursor moves to the beginning of the next line;and,if you press the LEFT ARROW key when you are at the beginning of a line,the cursor moves to the end of the previous line. This is because the NEWLINE character is a character just like any other and the next character immediately following the NEWLINE is at the beginning of the next line. You can also hold down the SHIFT key and press a cursor key to move the cursor more quickly. SHIFT-LEFT ARROW moves the cursor to the beginning of the line. SHIFT-RIGHT ARROW moves the cursor to the end of the line. SHIFT-UP ARROW moves the cursor to the beginning of the text. SHIFT-DOWN AROW moves the cursor to the end of the text. You can also use the mouse to quickly move the cursor. Just clicking the mouse in the field moves the cursor to the closest position to the mouse pointer that is possible. You can also grab the cursor with the mouse and drag it around. The text automatically scrolls around to follow the cursor. This is actually kind of fun! DELETION KEYS There are four ways to delete text. You can delete single characters,entire lines,or the entire field. BACKSPACE deletes the character to the left of the cursor. DEL deletes the character under the cursor. SHIFT-DEL deletes the entire line that the cursor is on,including the NEWLINE character. This has the effect of deleting the line and moving the rest of the text up one line. ESC deletes all of the text in the field. SHORTCUT KEYS Shortcut keys are keys that you can use instead of using the mouse for certain operations. Sometimes,just pressing a key is easier than using the mouse because you needn't keep moving your hand back and forth from the keyboard to the mouse. This is especially useful when you are editing records. It is not so useful when you are editing forms or just scanning your data. NEXT FIELD AND PREVIOUS FIELD Typically,to select a field(or a record or a form)you point at it and click. Sometimes,however,you want to go to the next one without taking your hands off of the keyboard. To do this,use the NEXT FIELD and PREVIOUS FIELD keys. 8-2 You won't find a NEXT FIELD key on your keyboard. This is because there are several keys that perform the NEXT FIELD function. The TAB key is always available to take you to the next field. The RETURN key is normally also available but some people prefer to use the ENTER key instead. See Chapter 16 - Preferences for more information about the RETURN vs. ENTER preference. You won't find a PREVIOUS FIELD key on your keyboard,either. This is because there are several keys that perform the PREVIOUS FIELD function. The SHIFT-TAB key is always available to take you to the previous field. The SHIFT-RETURN key is normally also available but some people prefer to use the SHIFT-ENTER key instead. See Chapter 16 - Preferences for moe information about the RETURN vs. ENTER preference. MENU SHORTCUT KEYS Typically,to choose a menu item you use the Amiga menu selection technique of holding down the right mouse button,pointing at the menu item,and releasing the button. Sometimes,however it is not convenient to take your hand off of the keyboard. In this case,use the Menu Shortcut Keys. The shortcut key for each menu selection is listed to the right of each menu item. It is always shown as an Amiga symbol and a letter. To use the menu shortcuts,simply hold down the RIGHT Amiga key and press the letter. For instance,instead of taking your hand off of the keyboard to exit the Record Editor,simply press RIGHTAMIGA-X. This only works with the right Amiga key,not the left! You will find that some care has been taken to keep the use of the Menu Shortcut keys consistent. RIGHTAMIGA-C allows you to copy files in the File View,copy records in the Magnification window,and copy forms in the Form List window. RIGHTAMIGA-X allows you to exit from nearly every editor. RIGHTAMIGA-A allows you to abandon your changes and exit from nearly every editor. And so on. We will not list all of the Menu Shortcut keys in this guide. You will find them listed in the menus on the screen. 8-3 REQUESTER SHORTCUT KEYS A requester is a window that shows up in the upper left corner of your screen asking you for a filename,alerting you of an error(e.g. out of memory),or asking you to verify some operation(e.g. Do you really want to delete everything?). Requesters always have a "button" in the lower right corner and sometimes have a button in the lower left corner as well. These buttons are not to be confused with the buttons on the mouse! These "buttons" are actually rectangles with text inside them,usually describing a choice that you must make. "Choosing the right button" does not mean "clicking the right mouse button" but means "point at the box on the right and click the left mouse button". In requesters with two buttons,choosing the left button always means "ok,do it" and choosing the right button always means "no,don't do it". In requesters with only one button,choosing that button always means "thanks for telling me,I'm done reading the message now". Instead of reaching for the mouse to press one of these buttons,you can use the Requester Shortcut keys. The button that you are most likely to choose is highlighted with a thick,dark line. You may simply hit RETURN or ENTER to activate this button. To choose the left button,you can press LEFTAMIGA-V(or COMMODORE-V on the Amiga 500 and 2000),or RIGHTAMIGA-V. To choose the right button,you can press LEFTAMIGA-B(or COMMODORE-B on the Amiga 500 and 2000),or RIGHTAMIGA-B. These may seem like abscure choices for shortcut keys but the reason for this choice is that LEFTAMIGA-V and LEFTAMIGA-B are used in all system requesters in Workbench 1.2(try it!). The rationale seems to be that V is on the left and B is on the right for choosing the left and right buttons respectively. Since Menu Shortcut keys always use the RIGHTAMIGA key rather than the left,we allow you to also use RIGHTAMIGA-V and RIGHTAMIGA-B so that you don't get confused about when to use the LEFTAMIGA key and when to use the RIGHTAMIGA key. You can always use the RIGHTAMIGA key in Microfiche Filer Plus if you like. CYCLE FIELD SHORTCUT KEYS Many fields in Microfiche Filer Plus "cycle" through options as you click on them. Examples of these cycling fields are:the "field type" box in the Data Definition Editor,the preferneces in the Preferences Editor,and the "form fields" in your forms. Rather than clicking on these fields to cause them to cycle,you may use the UP ARROW and DOWN ARROW keys to cycle up and down through the list. This is equivalent to clicking on the Cycle Up and Cycle Down gadgets in the Form Editor. 8-4 CHAPTER 9 - THE DATA DEFINITION EDITOR The Data Definition is a list of the fields that every record in the database contains. Unlike most database programs,this list can be changed at any time. The Data Defintion is just a list of field names,types,and formulas;these fields contain no data. In the Data Definition Editor you may specify,for instances,that each record in the database contains a place for a person's last name. Only later,in the Record Editor,do you actually specify that a particular person's last name is Jones. You can open the Data Definition Editor by double clicking on the Data Definition button in the Form List window. This brings up the Data Definition Editor window containing two columns of information. To the left is a left of the field names;to the right is a list of the field types. To the far right is a scrollbar. Change the Data Definition with care! You should ALWAYS save your database before editing the Data Definition in case you inadvertently delete large portion of your data. 9-1 FIELD NAMES Each field in the database has a name. It needs a name so that you can refer to this particular field later in the Form Editor. You can edit these names using all of the Editing Keys for Text Edit Fields. See Chapter 8 - Editing and Shortcut Keys for more information about editing keys. FIELD TYPES Each field in the database has a type. This type determines what you can put in the field,and how you can edit,sort,select,and print the field. The four field types are Text,Number,Picture,and Calculated. TEXT You will probably use the Text field type the most. A Text field contains,as you probably guessed,text. It can contain an essentially unlimited amount of text(the actual limit is 32,000 characters). Unlike other database programs,you need not specify in advance how much text the text field may contain. Text fields are "variable length",meaning that if you put two characters into a text field,it only takes up two characters of memory;if you put 1000 characters into a text field,it takes up 1000 characters of memory. Text fields are sorted as you would expect text to be alphabetized,with "John" coming before "Johnson" and "Albert" coming before "Zulu". NUMBER A Number field is identical to a Text field when it comes to editing. A Number field can contain an essentially unlimited amount of text,just like a Text field. It is also "variable length". Number fields are different from Text fields when it comes to sorting, selecting,and printing totals. At these times,the Number field is interpreted as a number by ignoring everything in the field but a minus(-) sign,the digits 0-9 and a decimal('.' or ',' based on your decimal preference). For instance, "$123.45 million dollars" is interpreted as 123.45 and "87/01/15" is interpreted as 870115.00. This allows you to put any separators you would like in these fields and still allow them to be sorted as if they were numbers. For instance,the data "86/12/15"(December 15,1986)would come before the date "87/01/15"(January 15,1987)when sorted. If you specify a format for your number in the forumal column,Microfiche Filer Plus will automatically format your numbers for you. You may specify the number of digits to the left and the right of the decimal place. Each time you leave a field in the Record Editor,the field is formatted to match your specification automatically. If you leave the formula column blank,your fields will be left just as you typed them. See the following section titled Formulas for more information about format specifications. Numbers may be displayed with many decimal places,but when searching or sorting,are always assumed to have two decimal places. Also,when searching and sorting,the largest meaningful number in a Number fields is 21,474,836.40 and the smallest meaningful number is -21,474,836.40. If a number is greater than this,it is simply assumed to be the maximum value. If there are no digits in the Number field,the value of the field is assumed to be 0. 9-2 If you try to select some records(using the Selection Editor)based on numbers in a Text field,you may be in for a surprise. Let's assume your database contains three records containing one Text field each,and the fields contain: "9","11",and "100". You attempt to select all records with Text fields that are less than 11. The record containing "100" is selected! The reason is that these fields are interpreted simply as text strings,not as numbers;the string "100" comes before "11" just like the string "BAA" comes before the string "BB";and, the string "9" does not come before the string "11" just like the string "Z" does not come before the string "BB". If you had used the Number type instead of the Text type,however,the results would have been as you expected:the record containing "9" would have been selected. PICTURE Picture fields contain,as you probably expect,pictures. More precisely,the picture itself is not stored in the database but the filename of the picture and the picture is actually read from the file and displayed automatically. Microfiche Filer Plus can display IFF pictures(e.g. from your painting program or your video digitizing program)or icons(.info files). Each Picture field actually contains the filename of the picture and several picture attributes. The picture attributes are used when the picture is read to squeeze and translate from up to 32 original colors to the two or four colors that can normally be displayed in Microfiche Filer Plus. See Chapter 12 - Pictures for more information about pictures. CALCULATED Calculated fields are basically number fields that are calculated automatically by MFF. You must specify a formula to use for this calculation. Once you have set up a calculated field,that field is automatically recalculated whenever you edit your data in the Record Editor. A good example of a calculated field would be on an invoice where the total invoiced amount would be calculated to be the unit cost,times the number of units,plus the sales tax(which is itself a calculated field),plus shipping. See the following section titled Formulas for more information about specifying a formula. FORMULAS A formula consists of two components,an optional format specification and an equation. Number fields may have a format,but not an equation. Calculated fields may have both a format and an equation. The purpose of a format is to specify the number of digits to the left and the right of the decimal place to display. A format is specified as:the minimum number of digits to the left of the decimal,a decimal,the number of digits to the right of the decimal,and a colon. If the number on the right is 0,the number is displayed as an integer,with no decimal place at all. The default format is 0.2. If either digit is omitted,the corresponding default is used. If no format is specified for a calculated field,the default format is used. 9-3 The following are some examples of valid formats and how the number 123.456 would look displayed in each: FORMAT RESULT 5.2: ' 123.46' 0.5: '123.45600' 2.0: '123' .1: '123.5' 6: ' 123.46' : '123.46' An equation consists of operators(add,subtract,multiply,divide,and parenthesis) constants(for example "-1.05"),and field references(for example "#12" meaning "the contents of field 12"). You write an equation just like you would type it on a calculator. The operators are the characters that you would expect except that the multiply character is expressed using the asterisk("*"). Standard algebraic precedence of operators is used. First,expressions within parenthesis are evaluated,then multiplication and division,then addition and subtraction. For example,the expression '1 + 2 * 3' equals seven. The following are some examples of valid equations and what they might express: EQUATION EXPLANATION #1 * #2 Compute the number of units purchased(in field 1)times the unit cost(in field 2) #3 * .05 Compute the tax(of 5%)on the amount in field 3 (#1 + #2 = #3) / 10 Add the numbers in fields 1,2,and 3,and divide by 10 A complete formula may include both a format and an equation. The following are some examples of valid formulas: FORMULA EXPLANATION 6.2: #1 = #12 Format and equation 0.5: (#1 + #8 * -45.98) - (#23 / 987.333) Format and complex equation .05 Always gives the value 0.05 4:#5 Always give the value of field 5 formatted using the format specification '4.2' ADDING FIELDS You can add a field to your Data Definition by choosing ADD FIELD from the EDIT menu. The new field appears at the end of the field list. The default field name is A new field and the default field type is Text. You can change either of these. DELETING FIELDS To delete a field,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose DELETE SELECTED FIELD from the EDIT menu. 9-4 You can change a field type to or from Picture,or to Calculated. This causes all of the old information in that field to be deleted. You can delete a field. This causes all of the information in that field to be deleted. You can change a formula. This may cause the information in that field to be changed. THE SCROLLBAR At the far right of the Data Definition Editor window is a scrollbar. If all of your fields do not fit into the window,the scrollbar becomes active. The white, outer box represents all of the fields;the size and location of the orange, inner box represents the number of fields that are currently displayed and approximately where in the list of fields the displayed list begins. For instance,if you have 60 fields and only 20 can be displayed at once,the orange box is approximately one third the size of the white box. If it is the first 20 fields that are being displayed,the orange box is located at the top. If it is the last 20 fields that are being displayed,the orange box is located at the bottom. There are two ways to scroll through a large field list: The most convenient way to scroll through the field list is to grab the orange box with the mouse and drag it until you find what you are looking for. Like the scrollbar in the Form List window,dragging this scrollbar causes the window to scroll immediately! You can also scroll through your field list one page at a time by clicking inside the white box but above or below the orange box to page up or down respectively. For instance,if,of 60 fields in the list the first 20 fields are displayed in the window,then the orange box in the scrollbar is at the top. If you click below the orange box the next 20 fields are displayed. And so on. Because of this scrollbar,you can have an unlimited number of fields per record. The only limit is what you can fit in memory or on a disk! LEAVING There are three ways to leave the Data Definition Editor. You can choose between saving your changes or abandoning them. The most common way is to simply click on the Close gadget in the Data Definition Editor window. If you have made any changes to the Data Definition, you are prompted to save the changes. The second way is identical in effect to the first and is to choose EXIT from the EDIT menu. If you have made any changes to the Data Definition,you are prompted to save the changes. The third way is to choose ABANDON CHANGES AND EXIT from the EDIT menu. If you have made any changes to the Data Definition,you are asked if you would really like to abandon them. If you answer ABANDON,all of your changes are lost. You should change your Data Definition with care. It is possible to inadvertently delete much of the data in your database by simply changing a field type,for instance. 9-6 If you make a nondestructive change and decide to save it,Microfiche Filer Plus attempts to make the change and if it is not successful(e.g. ran out of memory) simply returns you to the Data Definition Editor. If you make a destructive change and decide to save it,Microfiche Filer Plus recognizes that it is possible for something to happen while it is in the middle of making the change(such as running out of memory)that would destroy the database;so,it writes a temporary copy of the database to the disk before attempting the change. You must have enough room on your current diskette to hold a temporary copy of your database befoe you can perform destructive changes to your Data Definition. This temporary copy of the database is deleted after the change is made;so, don't count on it still being there if you realize that you just deleted all of the data in your database! ALWAYS save your database BEFORE attempting destructive changes to your Data Definition! 9-7 CHAPTER 10 - THE FORM EDITOR A "form" is simply a template that is used to display your data. It is analogous to the paper forms with which you are familiar. Paper forms have some text that prompts you for information(such as your last name)and a space for you to put that information. These computerized forms work exactly the same way. You may design your form so that some descriptive text is on the left (such as "Enter your last name:")and the space for that information is on the right,for instance. You use the Form Editor to design and lay out these computerized forms. You can open the Form Editor by double clicking on any form in the Form List window. This brings up the Form Editor window. At the top of the window is the form name,which you can change. Below the name is a work area where you define the contents of the form. CHANGING THE FORM'S NAME The form's name(which appears in the Form List window)is displayed at the top of the Form Editor window for editing. To change the form's name,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). You can then edit the name using all of the editing keys for Text Edit Fields. See Chapter 8 - Editing and Shortcut Keys for more information about editing keys. 10-1 SIZING THE FORM To change the size of the form,simply grab the Size gadget in the extreme lower right corner of the window and change the size. You cannot shrink the form beyond the edges of the fields in the form. The form can be as large as the screen(even as large as an interlaced screen,if you have enough memory). ADDING FIELDS You can add a field to your form by choosing ADD FIELD from the EDIT menu. The new field is placed wherever MFF can find space. If there is no room,you are notified. This field starts out as a Description field with the text "Description:" in it. DELETING FIELDS To delete a field,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then choose DELETE SELECTED FIELD from the EDIT menu. The selected field is deleted immediately. MOVING FIELDS To move a field,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then grab the field's Drag gadget and drag the field to its new location,just like you would drag a window to a new location. The Drag gadget only appears when the field is selected. The Drag gadget is the rectangle at the right side of the field just above the Size gadget(an arrow pointing southeast). Fields may not overlap. If you drop a field on top of another,MFF will let you know. 10-2 SIZING FIELDS To change a field's size,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then grab the field's Size gadget and drag it to change the size,just like you would change a window's size. The Size gadget only appears when the field is selected. The Size gadget is the arrow(pointing southeast)at the lower right corner of the field. Fields may not overlap. If you change the field's size so that it overlaps with another,MFF will let you know. Note that you can make a form field as small as a single character,but if you do,you will find it difficult to edit. There is a use for fields of this size. You saw a good example of this in the address book database that you explored in the Quick Tour. The last name and first name fields were separated by a comma. The comma was a single character field. The only way to edit a field of this size is to move it to another location,make it bigger,edit it,shrink it down again,and move it back. CHOOSING FIELD TYPES The terminology may seem a bit confusing:but,a form field can be either a named field(corresponding to one of your previously defined fields in the Data Definition)or a description field(which can contain some descriptive text). You choose the type of the form field in a way similar to choosing the type of a Data Definition field. You cycle through a list of possibilities. You cycle through the list of possibilities by clicking on the two Cycle gadgets. These two gadgets are located near the right side of the field,either to the left of or above the Drag and Size gadgets. Together,they look like a diamond. It actually is two gadgets,though,one immediately above the other. Click on the Cycle Up gadget and you find that you cycle through the list of fields that you defined in the Data Definition Editor. The Cycle Down gadget cycles through the list in reverse order. Alternatively,you may cycle through the list of named fields by using the UP ARROW and DOWN ARROW keys. If you wish to have the actual contents of a data field displayed when this form is used,choose one of the named fields that you defined in the Data Definition Editor. If you wish to have some descriptive text displayed when this form is used,choose the description field(which is the only field that shows up with a cursor in it). You can then edit the description using all of the editing keys for Text Edit fields. See Chapter 8 - Editing and Shortcut Keys for more information about editing keys. For example,you may create a form that includes two form fields. The first field,on the left,is a description field that says "Enter the last name here:". The second field,on the right,is a named field and is set to the field called "Last Name". Later,when you use this form to edit a record(or print one,or whatever)you see the text "Enter the last name here:"on the left and a box on the right where you can enter the last name. Note that in the Record Editor,the "Enter the last name here:" text has no box around it and you cannot edit it. 10-3 ORDERING FIELDS When the Form Editor window opens and you begin pressing the NEXT FIELD key,you notice that the form's name is selected first,then one field after another is selected. These fields are selected in the order that they were created. After shuffling the fields around a little bit,you may find that first a field near the bottom is selected,then a field near the top is selected,then another field somewhere is selected. You would probably rather have each field being selected one after another going down the form in an orderly fashion. To do this,you must "Order" the fields. Microfiche Filer Plus can order your fields one of two ways: If you choose ACROSS THEN DOWN from the ORDER menu your fields are sorted so that pressing NEXT FIELD selects successive fields from the upper left corner towards the bottom right corner,first across the form,then down. For instance, assume that you have two columns and several rows of fields in the form. Pressing the NEXT FIELD key first selects the leftmost field in the first row,then the rightmost field in the first row,then the leftmost field in the second row,and so on. If you choose DOWN THEN ACROSS from the ORDER menu your fields are sorted so that pressing NEXT FIELD selects successive fields from the upper left corner towards the bottom right corner,first down the form,then across. For instance, assume that you have two columns and several rows of fields in the form,as in the example above. Pressing the NEXT FIELD key first selects the leftmost field in the first row,then the leftmost field in the second row,then the leftmost field in the third row,and so on until you hit the bottom of the form. Then, pressing the NEXT FIELD key selects the rightmost field in the first row,then the rightmost field in the second row,and so on. There is another important reason to order the fields in a form. The database is sorted based on the order of the fields in the Sort form. It is sorted based on the first field,then the second,and so on. For example,assume you have an address book that contains three records. "John Anderson","Susan Anderson",and "John Jones". If the first field in the Sort form is the Last Name and the second field in the Sort form is the First Name,the database is sorted as your probably expect,"John Anderson" first,"Susan Anderson" second,"and "John Jones" third. However,if the first field in the Sort form is the First Name and the second field in the Sort form is the Last Name,the sorted order of the records is "John Anderson","John Jones",then "Susan Anderson". LEAVING There are three ways to leave the Form Editor. You can choose between saving your changes or abandoning them. The most common way is to simply click on the Close gadget in the Form Editor window. If you have made any changes to the form,you are prompted to save the changes. The second way is identical in effect to the first and is to choose EXIT from the EDIT menu. If you have made any changes to the form,you are prompted to save the changes. The third way is to choose ABANDON CHANGES AND EXIT from the EDIT menu. If you have made any changes to the form,you are asked if you would really like to abandon them. If you answer ABANDON,all of your changes are lost. 10-4 CHAPTER 11 - THE RECORD EDITOR Each record in your database contains a place for each field that you defined in your Data Definition. Initially,each field is empty. You use the Record Editor to enter data into these fields. You can open the Record Editor by double clicking on any record in the Magnification window. This brings up the Record Editor window. The information shown to you in this window is based on the current Edit form. You may see some descriptive text(e.g. "Enter the last name:")and you may see some boxes that are either empty or contain data. You can only edit things that are in boxes; these are the data fields. EDITING TEXT To edit the data in a Text field,first select the field(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). You can then edit the text using all of the editing keys for Text Edit Fields. You can insert text by simply typing,delete text using the BACKSPACE,DEL and ESC keys,and move around the text using the cursor keys. See Chapter 8 - Editing and Shortcut Keys for more information about editing keys. 11-1 EDITING NUMBERS Number fields are normally identical to Text fields when it comes to editing them;however,if you have set up a format specification for your number field,the number will be formatted for you after you have typed it in. Number fields are also handled specially when you sort,select,or total them. See Chapter 9 - The Data Definition Editor for more information about the interpretation of numbers in Number fields. EDITING PICTURES Pictures cannot be edited the way you would edit a picture in a painting program. Editing a picture consists of specifying which file the picture is in and choosing some squeezing and color translation options. First,you must select the picture field(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). This causes the box around the field to become highlighted. Notice that once you select a Picture field,the PICTURE menu is enabled. To load a pictue and set up its attributes for the first time,choose Edit the Picture Attributes from the PICTURE menu. You may then type in the filename of your picture,edit the various picture attributes,and read the file. See Chapter 13-The Picture Attribute Editor for more information. To simply load a picture that has already been set up,choose READ PICTURE FILE from the PICTURE menu. The picture is read,color translated,and squeeze (depending on your picture attributes),and displayed for you in the field. Finally,you can view the picture in its original,full color form by choosing DISPLAY FULL PICTURE from the PICTURE menu. Your picture is displayed in its original resolution and original colors on a separate screen. Even though they are not visible,the typical screen gadgets are at the top of this screen. You can grab the screen near the top and drag it down,or you can hit the Front and Back gadgets in the upper right corner. To get rid of this screen and return to the Record Editor,simply click anywhere below the invisible title bar. See Chapter 12 - Pictures for much more detailed information about pictures. EDITING ANOTHER RECORD From the Record Editor,you can immediately edit another record with a single keystroke and without going back to the Microfiche Magnification window. Choose SAVE AND EDIT BLANK RECORD from the EDIT menu to save the current record and immediately edit a blank record. If you have made any changes to the record,you are first prompted to save the changes. Choose SAVE AND EDIT A COPY OF THIS RECORD from the EDIT menu to save the current record and immediately edit a copy of it. If you have made any changes to the record,you are first prompted to save the changes. 11-2 Choose SAVE AND EDIT NEXT RECORD from the EDIT menu to save the current record and immediately edit the next record in the fiche. If you have made any changes to the record,you are first prompted to save the changes. Choose SAVE AND EDIT PREVIOUS RECORD from the EDIT menu to save the current record and immediately edit the previous record in the fiche. If you have made any changes to the record,you are first prompted to save the changes. LEAVING There are three ways to leave the Record Editor. You can choose between saving your changes or abandoning them. The most common way is to simply click on the Close gadget in the Record Editor window. If you have made any changes to the record,you are prompted to save the changes. The second way is identical in effect to the first and is to choose EXIT from the EDIT menu. If you have made any changes to the record,you are prompted to save the changes. The third way is to choose ABANDON CHANGES AND EXIT from the EDIT menu. If you have made any changes to the record,you are asked if you would really like to abandon them. If you answer ABANDON,all of your changes are lost. When entering lots of data in many records,you may find it inconvenient to continuously confirm that you want to save the record. So,you may want to set the confirm preference to DO NOT confirm when saving data. Then,MFF assumes that you know what you are doing and saves the record without asking you whenever you click on the Close gadget or select EXIT from the EDIT menu. 11-3 CHAPTER 12 - PICTURES Microfiche Filer Plus can manipulate,display,and print virtually any picture that you can generate on your Amiga. Unlike other databases,MFF can display a picture of ANY size including HAM,HiRes,LowRes,large,and small pictures with few or many colors. Because pictures require more memory than any other type of data,MFF uses several techniques to reduce the memory requirements,thus increasing the number of pictures that you can display in a database. For each picture in your database,you may choose between a number of options for displaying your images. You may choose picture squeezing strategies,color translation strategies,and whether to stretch your images. IFF PICTURES Microfiche Filer Plus can read and display essentially any IFF picture. MFF can display ANY size picture;this includes "brushes" from your paint program as well as full screen pictues and even pictures that are larger than the screen! Pictures that are displayed in the microfiche are limited to four colors. This is not horible,though,because you can set up a Color Translation Table to map the 32 colors of a picture into these four colors. The result is usually quite acceptable. See the picture of the sunset in the picture database that you used in the Quick Tour,for instance. If you really want to see your pictures in their original,full color beauty,you can choose DISPLAY FULL PICTURE from the PICTURE menu in the Record Editor. Your picture is displayed in its original resolution and original colors on a separate screen. Note that if you have a small memory machine(512K)you may wish to use only two colors for pictues,which save a LOT of memory. Depending on the type of pictures that you are using,this may be acceptable. See Chapter 16 - Preferences for more information about the number of colors preference. ICON (.INFO) PICTURES Microfiche Filer Plus can read and display the icon files that are used in the Workbench. This can be used to set up a database of your diskettes and their contents,for instance. Along with each program or data file entry,you could include a picture of its icon! The files in your directories with the extension .info are the icon files. To use an icon file,simply specify that one of these files is to be read when you are in the Record Editor. An example of an icon file that you may put in your database is :MFF_FILES/MFF.INFO (Microfiche Filer Plus's 'magnifying glass' icon). See the icon_picture database on your Microfiche Filer Plus master diskette for an example of an icon database. 12-1 PICTURE SQUEEZING When a picture is read from the disk and stored in memory,it is either truncated,squeezed,or stretched to fit the largest size that you have specified for this field in any of your forms. For instance,if you have designed two forms,one with the picture field size set to 100 by 100 pixels and the other with the picture field size set to 200 by 200 pixels,the pictures are always stored in memory as a 200 by 200 pixel image. Squeezing your picture consists of taking an image that is too large to fit in the designated space and squeezing it down until it does fit. The Color Translation Table is used to map the (up to) 32 colors of the original picture down to the four (or two) colors on the screen. "Squeezing" is a bit of a misnomer because pictures may also be stretched to fit in a designated space. Truncating your picture consists of taking an image that is too large to fit in the designated space and cutting off part of it so that it does fit. This means that if your picture is a LoRes image of 320 by 200 pixels and you want it to be displayed in a box that is 100 by 100 pixels in size,it is truncated and you only see the upper left corner of the 320 by 200 image. Also,no color translation is done if the pictures are truncated,so that your 32 colors are displayed as two or four by simply chopping off the most significant bits of the image. This is fine for icons because they only have four colors to begin with! It may or may not be acceptable for other pictures. Even though we have written highly optimized squeezing routines,squeezing a picture can still take some time. So we have provided several strategies for handling pictures,which you may choose on a picture by picture basis. These methods range from extremely quick to extremely slow performance: so,you can switch between the different options at different times for different reasons. You can specify,using the squeezing attribute in the Picture Attribute Editor, whether you want each picture to be quick squeezed,quality squeezed,truncated, or not loaded at all. The fastest way to load and display a picture is not to load it at all! The rest of the data in the record is loaded so that you may quickly search for the records that you are interested in,then you may ask that only the selected records be loaded. See the section titled Loading Pictures in Chapter 6 - The Data View for more information on the LOAD SELECTED PICTURES menu selection. The quickest way to actually load a picture is to have it truncated. You don't usually get a very useful image,though. The most common way to load and display a picture is to have it quick squeezed. You will lose small details in the image,but you will almost always get an image that is quite good! Color translation is done when quick squeezing. The slowest way to load and display a picture is to have it quality squeezed. This is,we feel,the best squeezing algorithm in the industry and will often actually allow you to read text in an image,even after it has been reduced to half size! Color translation is done when quality squeezing. 12-2 COLOR TRANSLATION When squeezing your pictures,Microfiche Filer Plus can perform color translation from the original colors in your image down to the two or four colors that are available on the Workbench. Microfiche Filer Plus can either do this automatically for you,or you may specify the translation by hand. When a picture is read,the palette of original colors is usually read along with it. Using this table,Microfiche Filer Plus can attempt to translate these original colors to the most appropriate of the four colors on the Workbench. You may ask MFF to translate by Color,Intensity,or Contrast. When mapping by color,MFF chooses the closest Workbench color to the original color. When mapping by intensity,MFF chooses the Workbench color with closest intensity to the original color's intensity. When mapping by contrast,MFF chooses matching colors that generate the highest contrast. In general,if your original image consists of a great many colors,mapping by color is probably your best bet. If your original image consists of just a few colors,but a great many shades of those colors,mapping by intensity or by contrast may be the best. You should just try each strategy to determine which is the best for each picture. PICTURE STRETCHING If your pictue is smaller than the allocated space for picture display,the pictue may be stretched to fit exactly into the space. This often happens if you are displaying brushes. You may choose,on a picture y picture basis,whether you want these picture stretched or not. 12-3 CHAPTER 13 - THE PICTURE ATTRIBUTE EDITOR Pictures are much more complex objects than text;therefore,we have provided a number of options for you to choose between when loading pictures. You may choose between four different picture squeezing strategies,five different color translation strategies,and whether to stretch your pictures or not. You may also fine tune the color translation a bit. The Picture Attribute Editor is where you accomplish this. See Chapter 12 - Pictures for thorough descriptions of the different squeezing strategies and color translation strategies. You can open the Picture Attribute Editor from within the Record Editor by first selecting the Picture field containing the pictue to be translated,then choosing EDIT THE PICTURE ATTRIBUTES from the PICTURE menu. This brings up the Picture Attribute window. You now see the filenmae of the picture,the Picture Squeezing option,the Color Translation option,the Stretching Option,and the Color Translation Table. To the left of the Color Translation Table,the current color is highlighted by an orange box(if you are using the default colors). To the right is a list of 32 boxes representing the 32 possible colors and within each box is the translation color. At the bottom,your choice of background color is displayed. THE PICTURE FILENAME To enter or edit the picture filename,you may use all of the familiar text editing keys to edit the filename. See Chapter 8 - Editing and Shortcut Keys for more information on editing keys. PICTURE SQUEEZING Clicking on the Picture Squeezing option causes it to cycle through the four options:Quality Squeeze,Quick Squeeze,Truncate,and Don't Load. See the section titled Picture Squeezing in Chapter 12 - Pictures for more detailed information on the detailed information on the different squeezing strategies. COLOR TRANSLATION Clicking on the Color Translation option causes it to cycle through the five options:Map by Color,Map by Intensity,Map by Contrast,Truncate Map,and Map Manually. 13-1 Choosing Map by Color,Map by Intensity,or Map Contrast,causes Microfiche Filer Plus to perform automatic color mapping each time the file is loaded and displayed. The color translation table that you may have set up by hand is ignored. Choosing Truncate Map causes Microfiche Filer Plus to do no translation whatsoever. This is faster but is usually only effective if you are loading only four color pictures. Choosing Map Manually causes Microfiche Filer Plus to use your color translation table. That way,you have total control over the color mapping. See the section titled Color Translation in Chapter 12 - Pictures for more detailed information on the different color translation strategies. STRETCHING Clicking on the Stretching option causes it to cycle between Allow Stretch and Don't Stretch. This is only meaningful if the picture that you want to load is smaller than the space that you have made available for display. THE COLOR TRANSLATION TABLE Microfiche Filer Plus uses only four colors when displaying pictures in the microfiche. Your original pictures can have up to 32 colors(and even 4096 colors when displaying HAM). When MFF reads a pictue and squeezes it,the colors are also sort of "squeezed". What really happens is that each of the original 32 colors is translated to one of the four Workbench colors and then displayed. You can specify to which of the four colors each of the 32 colors is mapped by using the Color Translation Table. Note that you can display pictures in either two or four colors depending on your number of colors preference. See Chapter 16 - Preferences for more information about the number of colors preference. Also note that if you are displaying a HAM image,you may only use automatic color translation,the color translation table is not used. The Color Translation Table is only used if you are squeezing pictures and have set the Color Translation option to Map Manually. AUTOMATIC COLOR TRANSLATION If you have loaded your picture at least once so far,the color map for that picture has been loaded and can be used to do some automatic color translation. By choosing Map Colors by Color,Map Colors by Intensity,Map Colors by Contrast, or Truncate Colors from GOTO_COLOR_TRANSLATE menu,Microfiche Filer Plus performs the color mapping just like it would have by setting the Color Translation option,and it displays the mapping for you in the Color Translation Table. You may now tweak the table to make it just right for this picture. Note that you must have set the Color Translation option to Map Manually or the Color Translation Table will not be used! 13-2 THE CURRENT COLOR Four boxes are on the left,one of each of the four Workbench colors. The currently selected color is outlined in orange(if you are using the default Workbench colors). This is the color that will be dropped into the Color Translation Table. You can change the current color by simply clicking in one of the four boxes on the left. That box is highlighted and is now the current color. THE COLOR TRANSLATION TABLE The Color Translation Table is the list of 32 boxes to the right in the window. The boxes are numbered from top to bottom then left to right. The first column represent colors 0,1,2,3,4,5,6,and 7;the second column represents colors 8,9,10,11,12,13,14,and 15;and so on. This matches the color palette displayed by most painting programs. The color inside each box is the color that is displayed in the Microfiche Magnification window each time the specified color is found in the original picture. For instance,the default Color Translation Table specifies that colors 0,4,8,12,16,20,24,and 28 are mapped to color 0(which is blue if you are using the default Workbench colors). Colors 1,5,9,13,17,21,25,and 29 are mapped to color 1(which is white if you are using the default Workbench colors). And so on. You can change one of the translation colors by simply clicking in the box. The color of the box changes to the current color. THE BACKGROUND COLOR Certain pictures,especially if they contain thin lines or text,will not be squeezed very well. The thin lines may disappear and the text may appear garbled. That is because the color of each pixel is determined by the predominant color in the area. The thinlines may disappear upon squeezing because they are overwhelmed by the colors around them. Often one color seems to dominate a picture and can be considered the background color. A pixel in the squeezed image is never set to the background color unless all of the pixels around it are also the background color. After choosing an appropriate background color your thin lines reappear! You will also find that squeezed text is more readable. Note that the Background Color option is only used if you are doing a quality squeeze. It is not used when quick squeezing! To set the background color for a picture simply click in the box in the lower right corner,next to the box that says BKGD:. This chooses the current color as the background color. To choose "no background color" simply click in the box at the bottom that says BKGD:. The box to the right of it now contains an X. 13-3 READING THE PICTURE To test your selections,you will want to read the picture and see the result. At any time you may hit RETURN or choose READ PICTURE FILE from the AUTO_COLOR_TRANSLATE menu. The picture will be loaded,squeezed,translated,and displayed in the space for it in the Record Editor. If you don't like the looks of it,simply tweak some of the parameters and read it again! Also,if you have changed any of the parameters when you leave,the picture will be brought up to date. LEAVING There are three ways to leave the Picture Attribute Editor. You can choose between saving your changes or abandoning them. The most common way is to simply click on the Close gadget in the Picture Attribute window. If you have made any changes to the Color Translation Table or the other options, you are prompted to save the changes. The second way is identical in effect to the first and is to choose EXIT from the EDIT menu. If you have made any changes to the Color Translation Table or the other options,you are prompted to save the changes. The third way is to choose ABANDON CHANGES AND EXIT from the EDIT menu. If you have made any changes to the Color Translation Table or the other options,you are asked if you would really like to abandon them. If you answer ABANDON,all of your changes are lost. 13-4 CHAPTER 14 - THE SELECTION EDITOR There are three ways to select a list of your database records. The easiest way is to simply shift click on each record that you want to include in the list. Another way is to choose ALL from the SELECT menu to select them all. The third method,using the Selection Editor,is the most complicated,but the most powerful way to select a list of records. Using the Selection Editor,you can select all of the people in your database whose last name begins with S,for instance. Or you can select all of your friends in Massachusetts. Or you can select all of your checks that were written for more than $100 in January. You can open the Selection Editor by choosing BY FIELD from the Magnification window's SELECT menu. This brings up the Selection Editor window which contains two columns of information. To the left is a list of the field names;to the right is a list of the selection criteria. To the far right is a scrollbar. SELECTION CRITERIA Using the Selection Editor,you enter the criteria for each field that you are interrested in. Then,MFF searches through all of the records in your database, looking at each field in each record to determine if that record matches your selection criteria. 14-1 You can specify that MFF should select the record if: This text is found anywhere in the field. The field begins with this text. The field ends with this text. The field matches this text exactly. The field is greater than this text(using alphabetical order;Z is greater than A). The field is less than this text)using alphabetical order;A is less than Z). The field matches this number exactly(for Number fields only). The field is greater than this number(for number fields only). The field is less than this number(for number fields only). If you specify a criterion for two or more fields,it means "if filed 1 matches AND field 2 matches AND field 3 matches,then select the record". If you wish to select all records that match criterion 1 OR criterion 2,then you must use the Selection Editor twice. For instance,if you wish to select all of the people that live in Massachusetts or in California,you must first select all people that live in Massachusettes. Then,leaving those records selected,use the Selection Editor again to select all people that live in California. The Californians are then added to the list. You can also use the NOT operator to invert the meaning of the criterion. For instance,you can specify that all people should be selected with the last names that begin with the letter S. You can use the NOT operator to select all people with last names that do NOT begin with the letter S. This applies to every possible criterion;you can ask for all records with fields that are NOT equal to something,or that do NOT contain something,and so on. You can apply two criteria to a single field by using the AND operator. For instance,you can use the AND operator to ask for all checks with value greater than 50 AND value less than 100. This is the only place anywhere in Microfiche Filer Plus that you must type obscure command strings. This is because it is nearly impossible to allow this kind of flexibility using icons or some other graphic metaphor. So please bear with us... To select records based on a criterion,first select the criterion field to the right of the pertinent field(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Then type in a criterion expression. THE OPERATORS A criterion expression consists of either some text(which may match anywhere in the field)or any OPERATOR then some text. The operators are: text text with on operator means "match any field that includes this text anywhere in the field". 14-2 <>text the ENDS WITH operator(>>)means "match any field that ends with this text". =text the EQUAL TO operator(=)means "match any field that exactly matches this text". If this is a Number field,the EQUAL TO operator means "match any field that exactly matches this number". >text the GREATER THAN operator(>)means "match any field that is greater than this text(using alphabetical order)". If this is a Number field the GREATER THAN operator means "match any field that is greater than this number". 5(NOT GREATER THAN 5),fields that contain numbers that are less than or equal to 5 are selected. expr1&expr2 the AND operator(&)combines with any two of the above expressions means "match any field that matches both expression1 and expression2". " the QUOTE CHAR(")is not an actual operator but is used when you want an operator to be ignored. For instance,if you wanted to select all records with an exclamation point in the Notes field,you could not use ! because that means "match all fields that don't contain nothing" or "match all fields that contain an exclamation point". The QUOTE CHAR causes MFF to ignore the fact that the exclamation point is normally the NOT operator. If you wish to search for a QUOTE in the text,you must quote the quote! EXAMPLES Whew! Let's go through some examples and try to understand how these operators are used. Most of these examples are based on the Address Book database that you used during the Quick Tour. The number examples are based on an imaginary Checkbook database with a Text field called To that includes descriptions of who the check was written to and a Number field called Value that is the value of the check. These examples begin with the field name,a dash,and the criterion for that field,then a description. Notes - friend selects all records with the word "friend" in the Notes field. Last Name - M selects all records with last names not greater than "M". This selects names from A-M. 14-3 Last Name - <512K selects all records that have the string '>512K in the notes field. Does not select records that have the string '1000K' in the notes field! Value ->50&<100 selects all checks written for between $50 and $100. Value ->100 To - !MIT selects all checks written for more than $100 that were not written to MIT. OTHER CONSIDERATIONS The case significant preference determines whether uppercase and lowercase letters should be considered the same or not. If you have set Dictionary sort and search,'a' and 'A' are the same and the letter 'a' comes before the letter 'Z' as you would expect. If you have set ASCII sort and search 'a' and 'A' are not the same and the letter 'Z' comes before the letter 'a' because uppercase letters come before lowercase letters. It is obvious that the selection criteria actually apply to the text in a Text field and to the numbers in a Number field,but what about Picture fields? The selection criteria apply to the filename in the Picture field. So,you can search for all pictures in the "Picture" directory,for instance. CLEARING THE SELECTION CRITERIA You can clear all of the selection criteria by choosing CLEAR SELECTION CRITERIA from the EDIT menu. THE SCROLLBAR At the far right of the Selection Editor indow is a scrollbar. If all of your fields do not fit into the window,the scrollbar becomes active. The white,outer box represents all of the fields;the size and location of the orange,inner box represents the number of fields that are currently displayed and appoximately where in the list of fields the displayed list begins. For instance,if you have 60 fields and only 20 can be displayed at once,the orange box is approximately one third the size of the whole box. If it is the first 20 fields that are being displayed,the orange box is located at the top. If it is the last 20 fields that are being displayed,the orange box is located at the bottom. There are two ways to scroll through a large field list. 14-4 The most convenient way to scroll through the field list is to grab the orange box with the mouse and drag it until you find what you are looking for. Like the scrollbar in the Data Definition Editor,dragging this scrollbar causes the window to scroll immediately! You can also scroll through your field list one page at a time by clicking inside the white box but above or below the orange box to page up or down respectively. For instance,if,of 60 fields in the list the first 20 fields are displayed in the window,then the orange box in the scrollbar is at the top. If you click below the orange box the next 20 fields are displayed. And so on. LEAVING There are three ways to leave the Selection Editor. You can choose between performing a selection or not. The most common way is to simply click on the Close gadget in the Selection Editor window. Without asking,MFF immediately searches your database and selects all records that meet your criteria. It also remembers your selection criteria for the next time you open the Selection Editor window. The second way is identical in effect to the first and is to choose EXIT from the EDIT menu. Without asking,MFF immediately searches your database and selects all records that meet your citeria. It also remembers your selection criteria for the next time you open the Selection Editor window. The third way is to choose ABANDON CHANGES AND EXIT from the EDIT menu. If you have made any changes to the selection Criteria,you are asked if you would really like to abandon them. If you answer ABANDON,all of your changes are lost. 14-5 CHAPTER 15 - PRINTING You MUST have your printer installed correctly. Unfortunately,there is a bug in AmigaDos that may cause the machine to crash if you have a printer installed as CUSTOM rather than using one of the other drivers(in the Workbench Preferences). Microfiche Filer Plus can print any or all of the records in your database using the print forms. If your printer can print graphics,any type of data can be printed including pictures. If your printer can only print text,you still have full printing flexibility but cannot print pictures. You have an extensive number of printing options to choose form including titles on each page,multiple columns of records,skipping over the edges of pages,and printing to a file instead of to the printer. You can also use the Workbench Preferences to control some aspects of printing including whether to print pictures in black & white or color,the page size,and the page width. PRINT OPTIONS You can select print options by choosing EDIT PRINT OPTIONS from the Magnification window's PRINT menu. This brings up the Print Options Editor window which contains several print options that you can change. 15-1 To change a print option,first select it(either by clicking on it or by using the NEXT FIELD and PREVIOUS FIELD keys). Each time you click on the option after selecting it causes it to cycle through the list of options. Keep clicking on it until the option that you want is displayed. Alternatively,you may cycle through each print option by using the UP ARROW and DOWN ARROW keys. In the following list,the print option name is on the left,followed by the list of choices,followed by a description of each choice. The default choice is described first. Title No title pages are printed with no title. Print title on first page only a title is printed on the first page,but not on subsequent pages. You format the title by defining the Print Title form. Print title on its own page a title is printed on its own page:the rest of the pages contain records only. You format the title by defining the Print Title form. Print title on every page a title is printed on every page. You format the title by defining the Print Title form. Number of forms Use only print form 1 only Print Form 1 is used when printing each record. Print forms 2 and 3 are completely ignored. Use print forms 1 and 2 both Print Form 1 and Print Form 2 are used,one above the other,when printing each record. This allows you to print each record on a larger pre-printed form,for instance. Use print forms 1,2, and 3 all three print forms are used,one above the other,when printing each record. This allows you to print each record on a very large pre-printed form,for instance. Use print forms 1 and 2 horizontally both Print Form 1 and Print Form 2 are used,one next to the other,when printing each record. If you have set your printer to print in condensed mode,this allows you to print all the way across the page,using up to about 160 characters. Number of columns One column of records records are printed down the page only,not across the page. Many columns of records as many records as will fit are printed across the page then down the page. 15-2 Records per page Many records per page as many records as will fit are printed down the page. One record per page one record is printed on each page. Page perforations Skip past page perforations skips past the perforations at the bottom of a page of printer paper by issuing a FORM FEED two lines from the bottom of the page. Ignore page perforations ignores page perforations and acts like you are printing on a continuous roll of paper. This option is best used when you use small sheets of paper(e.g. mailing labels). This option should also be used if you are printing to a file for use with another program,such as for mail merging;otherwise,the file will contain blank lines and FORM FEEDs periodically throughout Single Sheet Feeding Print on continuous feed paper prints the entire report without ever stopping. Print on single sheets of paper prints only one page at a time,then waits for you to insert another page. Totals No totals no totals are printed. Print totals totals are printed on the last page using the Print Totals form Blank space No blank space between records records are tightly packed,with no blank lines or blank spaces between them. Print blank space between records a blank line is put between each row of records and,if you are printing many columns of records,a blank space is put between each column of records. Number of copies if this field is blank,or contains any number less than 1,only one copy of your report is printed. Many copies of the same report can printed by entering the number that you desire. 15-3 Print to file if this field is blank,the records go to the printer. If you have put a filename here,the records are "printed" to the file instead. Note that pictures cannot be printed to a file. WORKBENCH PREFERENCES USED FOR PRINTING These Workbench printer preferences change the look of your printout but are used only by the system and are not directly used by MFF. Graphic Preferences including whether to print in black & white or color and whether to print positive or negative images. These influence the printing of pictures only. In order to activate these options once you have chosen them usually requires you to reset your printer(by double clicking on the InitPrinter icon in the System drawer). Pitch changes the size of the characters that are printed. Quality changes between draft quality and letter quality if your printer can do this. Spacing influences the number of lines that you can fit on a age. These Workbench printer preferences are used directly by MFF to print your data: Paper length defines the number of lines on a page. Left and Right Margin defines the width of the page. PRINT FORMS Each record is printed using Print Form 1,and optionally Print Form 2 and Print Form 3(depending on your Number of forms print option). If you are printing titles,the Print Title form is used. All description fields in the Print Title form are printed and any named fields are filled with the data from the next record to be printed. If you are printing totals,the Print Totals form is used. Description fields in the Print Totals form are printed directly. The total value is printed for each Number field that is specified in the Print Totals form. The total is computed by adding the value in that Number field in each of the selected records. The total number of records is printed for each Text or Picture field that is specified in the Print Totals form. Imagine you had a Checkbook database with a Text field called To that includes descriptions of who the check was written to and a Number field called Value that is the value of the check. A Print Totals form might have three fields: The first field is the To field. The second field says "checks totaling $". The third field is the Value field. 15-4 You select and print three checks,one for $50,one for $100,and one for $200. At the bottom of the printout would be a line that says "3 checks totaling $350.00". The "30 is printed because the To field is a Text field and the total number of records is always printed for a Text field. The 350.00" is printed because that is the total of the Value fields in the three records. PICTURES When you print text only,MFF uses the text printing capabilities of your printer which is usually much faster than graphics printing. When you print pictures,the entire record is printed in graphics mode,and is sized to fit all the way across the page(based on your left and right margins Workbench preferences)and to maintain the correct aspect ratio based on this width. Unfortunately,when printing graphics,there is no way for MFF to determine exactly how big the picture is,so it loses track of where it is on a page. Therefore,several of the Print Options are ignored if you are printing pictures. The number of columns print option is ignored completely. Pictures are always printed in a single column. The page perforations print option is ignored. Printing to a file is invalid. You can only print pictures on the printer. If you have set the records per page print option to many records per page,it works as you expect,printing exactly one picture per page(and maybe a title if you have asked for it). PRINTING To print some records on your printer: 1. Choose a Print Form 1 and,if you need them,a Print Form 2,a Print Form 3,a Print Title form and Print Totals form. See Chapter 10 - The Form List Window for more information about choosing the print forms. 2. Set your print options using the Print Options Editor. 3. Be sure that the print to file print option is blank. 4. Select the list of records that you want to print(using any of the record selection methods). See Chapter 6 - The Data View and Chapter 14 - The Selection Editor for more information about selection records. 5. Choose PRINT from the Magnification window's PRINT menu. 15-5 Printing starts immediately. If something went wrong and your printer wasn't turned on or just won't print,don't worry. Just wait 30 seconds or so until a message comes up asking about it and choose CANCEL. Don't try printing again until you have made sure that your printer is installed correctly using the Workbench Preferences. Refer to your "Introduction to Amiga" manual about installing your printer. At any time,you can stop the printing by clicking on the ABORT button in the PRINTING window. PRINTING TOTALS ON THE SCREEN To print the totals on the screen: 1. Select the list of records that you want to total(using any of the record selection methods). See Chapter 6 - The Data View and Chapter 14 - The Selection Editor for more information about selecting records. 2. Choose DISPLAY TOTALS ON SCREEN from the Magnification window's PRINT menu. A window opens and displays the totals,just as if you printed them. 15-6 CHAPTER 16 - PREFERNECES Microfiche Filer Plus uses your Preferences for displaying and sorting data, displaying files,displaying pictues,and so on. These preferences are analogous to your Workbench Preferences and can be saved on disk or just used temporarily. Your Preferences can be chosen using the Preferences Editor. You can open the Preferences Editor by choosing EDIT PREFERENCES fom the Magnification window's PREFERENCES menu. This brings up the Preferences Editor window which contains many preference options that you can chage. THE PREFERENCES FILE When you start MFF,it looks around on your disk for a preferences file called mff.prefs. It first looks in the current directory;if it is not found here it looks in the root directory(e.g. df1:);finally,if it is not found there it looks in the :MFF_Files directory. If no preferences file is found,the default preferences are used. After finding the preferences file,MFF looks at the default directory preference and if a directory is specified,changes to that directory is specified,changes to that directory and reads the preferences file,if one exists. Using the default directory field is a handy way to set up your diskette so that every time you start MFF,it takes you to the directory that holds all of your databases. The Microfiche Filer Plus master diskette is set up this way. It always takes you to the :Microfiche directory. 16-1 Some of the preferences take effect immediately upon changing them and leaving the Preferences Editor. Others are effective only upon startup of MFF. PREFERENCES WHICH ARE EFFECTIVE IMMEDIATELY These preferences are effective immediately. In the following list,the preference name is on the left,followed by the list of choices,followed by a description of each choice. The default choice is described first: Workbench vs. Cli Use Workbench - save .info files MFF will always write a .info file whenever it writes a database file so that you can access the database file from the Workbench. Without an associated .info file,you cannot even see the file from the Workbench and must use the CLI to access the file. MFF uses a copy of the file ":MFF_Files/mff.project.info". Use CLI - DON'T save .info files MFF does not write a .info file whenever it writes a database file. With a .info file,you cannot access the file from the Workbench. This keeps your directories from becoming cluttered with .info files if you predominantly use the CLI,though. Sort order Sort in ASCENDING order MFF always sorts your data in ascending order meaning that 'A' comes before 'B'. Sort in DESCENDING order MFF always sorts your data in descending order meaning that 'B' comes before 'A'. Don't sort MFF will not sort your data. This is a great time saver if you are entering large amounts of data and don't want to be constant sorting and redisplaying of the data. Case significant Dictionary sort and search uppercase characters are treated like they were lowercase characters for sorting and searching. This means that the letter 'A' looks the same as the letter 'a'. Also,all European characters are sorted into correct(or approximately correct)dictionary order. ASCII sort and search uppercase and lowercase characters are treated differently for sorting and searching. This means that the letter 'A' is different from the letter 'a'. When sorting,uppercase characters always come before lowercase characters. For instance,the letter 'Z' comes before the letter 'a'. 16-2 Memory paranoid Memory paranoid - keep msg window around MFF always keeps the MFF Message window around so that it can alert you about low memory conditions and such. This is done because when memory is really low,there is not enough memory left to even open a window to tell you so! Not paranoid - don't keep window around MFF only opens the MFF Message window when it needs it. The problem is that when memory is really low,there is not enough memory left to even open a window to tell you so! If you have a lot of memory,you may wish to use the not paranoid option. File display Display only DATABASE files MFF only displays Database and Directory files in the File View. This keeps the list from being cluttered with icon files,backup files,and other files that you are probably not interested in. Display ALL files MFF displays all files in the File View. This allows you to look at, copy,and delete Other files as well as Database and Directory files. Confirm Confirm when saving data MFF always asks if you want to save your changes when you exit from the Record Editor. DO NOT confirm when saving data MFF does not ask if you want to save your changes when you exit from the Record Editor. It always saves your changes unless you ABORT rather than EXIT. This is usually the most convenient way to edit large numbers of records. You needn't be bothered with pressing SAVE each time you exit from the Record Editor. Picture loading Load pictures when opening pictures are loaded when the database is opened. Don't load pictures when opening pictures are not loaded when the database is opened. The rest of the data is loaded. The pictures may be loaded later by choosing LOAD SELECTED PICTURES from the FILE menu after the database is loaded. Picture in fast RAM Put pictures in CHIP RAM pictures are put in chip RAM only. This option should be used to save memoy if you have no fast RAM. 16-3 Put pictures in FAST RAM pictures are put in fast RAM. The number of pictures that you may have loaded is limited only by your total RAM;however,it takes some extra memory each time you manipulate a picture. You should only use this option if you actually have fast RAM. Data display order Display data DOWN data is displayed first down the fiche,then across. Display data ACROSS data is displayed first across the fiche,then down. RETURN vs. ENTER and ,normal the RETURN key is the NEXT FIELD key and the ENTER key is the NEWLINE key. See Chapter 8 - Editing and Shortcut Keys for more information about the NEXT FIELD and NEWLINE keys. Decimal Use '.' for decimal the '.' is used to denote a decimal place. Used in the USA and some other countries. Use ',' for decimal the ',' is used to denote a decimal place. Used in many countries including Europe. PREFERENCES WHICH ARE EFFECTIVE ONLY AT STARTUP These preferences are effective only upon startup of MFF. If you change one of these preferences,you must SAVE it,leave MFF,and restart MFF. In the following list,the preference name is on the left,followed by the list of choices, followed by a description of each choice. The default choice is described first. Default directory when MFF starts up and finds a preferences file with a default directory,MFF changes to that directory and looks for another preferences file. This option is really useful only in the preferences file that is in the :MFF_Files directory so that when MFF is started you are automatically taken to the directory that contains your database files. 16-4 Numbers of colors Two colors for data MFF uses only a single bitplane to hold the microfiche data which means that it contains only two colors. For text database,there is no reason to use more than two colors. This saves a lot of memory. Four colors for data MFF uses two bitplanes to hold the microfiche data which means that it contains four colors. You may wish to use this option for picture databases,but there is no reason to use this for text databases. This option uses more memory than the two color option. Microfiche size 1/3 of maximum size for a microfiche the microfiche is only one third of the maximum size for a microfiche. This is large enough to display about 40 lines of text(but in many columns). Of course,your database can be much larger than what can actually be displayed. You must use the scrollbar in the Fiche window for large databases. This is another great memory saver. 1/2 of maximum size for a microfiche the microfiche is only one half of the maximum size for a microfiche. This is large enough to display about 60 lines of text(but in many columns). Of course,your database can be much larger than what can actually be displayed. You must use the scrollbar in the Fiche window for large databases. Full size for a microfiche the microfiche is full size. This is large enough to display about 120 lines of text(but in many columns). Of course,your database can be much larger than what can actually be displayed. You must use the scrollbar in the Fiche window for large databases. You probably should not use this option unless you have extended memory. Screen Open on a separate screen Microfiche Filer opens on a separate screen,not the Workbench screen. This screen is the same size and type as your Workbench screen and may have either 2 or 4 colors,based on your Number of Colors preference. This may use a little more memory than opening on the Workbench screen but screen updats are faster and the screen is less cluttered. Open on the Workbench screen Microfiche Filer opens on the Workbench screen. This probably saves a little memory but adds to screen clutter. 16-5 SAVING PREFERENCES PERMANENTLY To save your preferences permanently,choose SAVE THESE PREFERENCES AND EXIT from the FILE menu. You are prompted for the directory where you would like to put the preferences file. If you choose SAVE but have entered no name,the preferences file is put in the current directory. You can put the file anywhere,but the two other important places where you may want to put the file is in the :MFF_Files directory and in the :(or root)directory. These two directories are searched for the preferences file when you start up MFF. LEAVING There are four ways to leave the Preferences Editor. You can choose between saving your changes on the disk,using your changes temporarily,or abandoning them. The most common way is to simply click on the Close gadget in the Preferences Editor window. If you have made any changes,you are asked whether you wish to use these preferences. If you answer yes,those preferences that are effective immediately are used. The preferences are not written to a file. The second way is identical in effect to the first and is to choose USE THESE PREFERENCES AND EXIT from the FILE menu. If you have made any changes,you are asked whether you wish to use these preferences. If you answer yes,those preferences that are effective immediately are used. The preferences are not written to a file. The third way is to choose SAVE THESE PREFERENCES AND EXIT from the FILE menu. If you have made any changes,you are prompted for the directory where you would like to put the preferences file. If you choose SAVE but have entered no name, the preferences file is put in the current directory. You can put the file anywhere,but the two other important places where you may want to put the file is in the :MFF_Files directory and in the :(or root)directory. These two directories are searched for the preferences file when you start up MFF. The fourth way is to choose ABANDON CHANGES AND EXIT from the FILE menu. If you have made any changes,you are asked if you would really like to abandon them. If you answer ABANDON,all of your changes are lost. 16-6 CHAPTER 17 - INTRODUCTION TO MACRO PROGRAMMING Microfiche Filer Plus provides a full programming language for your use. These programs are called macros. You may write simple macros to automate common database operations or complex macros to transfer data between MFF and other commerical applications that support the same language,ARexx. The macro language is actually the ARexx language,which is a commerical product available separately. In order to write MFF macros,you must first obtain and install ARexx by reading the chapter on installation in your ARexx manual. ARexx is a programming language similar to BASIC or PASCAL. It is designed in such a way as to make writing simple macros simple. It does have the power of a full programming language and,with some experience,you will be able to write very complex macros that communicate between multiple applications,and more! In this chapter,we will not attempt to teach you everything there is to know about programming;there are entire books on the subject! We will show you how to write some simple and very useful macros,though. To learn more,you should read your ARexx manual and run some of the many examples that we have provided for you on the disk. Before reading this chapter,you must be familiar with the basic operation of Microfiche Filer Plus. We will not attempt to explain what a "record" or a "field" is,or what "selecting" or "sorting" are here! Be forewarned! THE BASICS It is much,MUCH easier to develop macros when you have started Microfiche Filer Plus from the CLI rather than from the Workbench. When you start from the CLI and run a macro in MFF,any output from that macro(including error messages)will show up in your original CLI window. When you start from the Workbench,there is no place for these messages to go! Once you have developed and debugged a macro, it makes no difference whether you run it from an MFF started from the CLI or the Workbench. 17-1 To enter and run a macro,choose EDIT & RUN MACRO from the MACRO menu. This brings up a requester asking you to type in a macro(or enter the name of a macro file). For small macros,you may type them directly into MFF and have them saved with your database. For larger macros,you must use a text editor and store them in a file. Then,you may simply type the filename to run the macro. When you are prompted to type in a macro,you may either type the name of the macro,or type what is called a "string file". If you surround the macro with quotes("),it is interpreted as a string file and is executed directly. If you simply type a name,it is interpreted as a filename,your current directory is searched for a file with that name(and the extension ".mffm"),and,if found, that file is executed. All of the examples in this chapter will be short enough for you to type in directly as "string files". You may type these examples into a file using your favorite text editor later if you wish to expand on the ideas presented here and create more complex macros. AN AUTOMATIC SELECTION EXAMPLE In Microfiche Filer Plus there is no way to save your selection criteria; however,you can write a simple macro that performs your favorite selection and save that! 1. Load the example address book database in the Macros drawer. If you run MFF from the CLI,it will be easier to work the following examples. 2. Choose EDIT & RUN MACRO 2 from the MACRO menu. 3. Type the following simple macro into the window: "sel.6.criterion ='=MA'; select_by_field sel; move_selected_to_front;" Note that the macro is surrounded by double-uotes(")and that single quotes are used within the macro. Don't forget that you must hit the ENTER key,not the RETURN key at the end of lines! 4. Click on the RUN MACRO button. You should now see that all of the people living in Massachusetts have been selected and brought to the front of the database! What the macro did was: 1. Set up what is called a "compound variable" called sel with the desired criteria. We have set up the criterion for field 6(the State)to '=MA'. This will locate everyone in Massachusetts. "Compound variables" are ARexx structures,similar to a record in a database. They can contain several pieces of information. We have stored only one piece of information for now,but hang on for more! 17-2 2. Performed a SELECT_BE_FIELD command using the variable SEL. 3. Moved all of the selected items to the front using the MOVE_SELECTED_TO_FRONT command. Notice that you could have performed these same operations by hand,but by writing a macro to do them,it happens much more quickly and is less error prone! ENHANCING THE AUTOMATIC SELECTION EXAMPLE Let's get a little more sophisticated. We will now narrow the selection criteria to "friends in Massachusetts",and we'll make sure that when this macro is run all previous selections are erased. 1. Choose EDIT & RUN MACRO 2 from the MACRO menu. Your old macro is still there. 2. Move the cursor down to the second line and insert the following: sel.10.criterion = 'friend'; select_none; 3. Click on the RUN MACRO button. Note that we are still performing the SELECT_BY FIELD SEL command but the variable SEL now contains two pieces of information. Field number 6(the State field)contains the string "MA" and field number 10(the Notes field)contains the string "friend". A MORE SOPHISTICATED EXAMPLE The last example was trivial,but introduced some important concepts. The last example really only used Microfiche Filer Plus commands. This example will use some ARexx commands and functions. Specifically,we will write a loop that performs several operations over and over again,and we will call an ARexx function,UPPER(),to rranslate a string to uppercase. Some of the beauty of using ARexx as the macro language is that ARexx provides dozens of special string handling functions that you can use to manipulate the data in your databases. This macro will first select all of the records in the database,then will step through them,one by one,and change the last names to uppercase. 1. Choose EDIT & RUN MACRO 3 from the MACRO menu. 2. Type the following macro into the window: "select_all; first; do while (rc = 0); get rec; rec.2.value = UPPER(rec.2.value); put rec; next; end;" 17-3 3. Click on the RUN MACRO button. Here's what happened: 1. The select_all command was executed. This selected all of the records in the database. 2. The first command was executed. This prepares us for grabbing all of the selected records,one at a time,to work on. This actually moves us the the FIRST selected record. 3. The command DO WHILE(RC=0)means "do everything between here and the END command over and over again until an error occurs". RC is the "return code" from a command. If RC is 0,the command was successful,or else the command was not. In this particular loop,RC will be 0 until we run out of records;then it will be set to 2. 4. The command GET REC gets all of the data in the current record into the variable REC so that we may manipulate it. 5. The command REC.2.VALUE = UPPER(REC.2.VALUE)changes field 2(the Last Name) to uppercase. 6. The command PUT REC puts the data back into the database. 7. The command NEXT moves us to the next record. 8. Then we go back and get the next record until we run out of records! It turns out that this particular form of macro is extremely useful. Small permutations of this macro can do things like "go through these selected names and mark them 'BUSINESS ASSOCIATES'",or "select all of the overdue invoices,mark them 'OVERDUE',add 1.5% interest,and print them",or...you get the idea. Please go back now and make some small changes to the macro to see the effect. Some things you may want to try: Change REC.2.VALUE to REC.1.VALUE. Change UPPER(REC.2.VALUE) to REVERSE(REC.2.VALUE). See the Functions chapter in your ARexx manual for a complete list of functions that you can use for manipulating strings and more. Add the PRINT command to the end of your macro to generate a listing of the changes that the macro has made. AN ELABORATE PRINTING EXAMPLE Let's try one more macro that is more elaborate,that prompts for information, that searches a list,and that performs some printing. This macro prompts you to load mailing labels into your printer,prints them, changes the print form,prompts you to load regular paper,and prints again. If you don't have any mailing labels,just use regular paper. 17-4 1. Select a few records using the selection editor or by shift-clicking on several records. 2. Choose EDIT & RUN MACRO 4 from the MACRO menu. 3. Type the following macro into the window: "request 'Load mailing labels.'; if (rc ~=0)then exit; print; get_form_list forms; do i=1 to forms.number while(forms.i.name ~= 'Display All'); end; forms.print_form1 - i; put_form_list forms; request 'Load regular paper'; if (rc ~=0)then exit; print;" 4. Click on the RUN MACRO button. Here's what happened: 1. This macro didn't begin by selecting the data to work on,so it used the items that you had already selected. You could just as easily have attached this macro to the end of the first simple macro that you built,and had the macro first do the selection,then the printing. 2. The request command was executed. This puts up a Microfiche Filer Plus requester asking for a yes or no answer. 3. The command if(rc~=0)then exit "if the return code is not equal to 0,then exit". If you choose "No" in the requester,the return code is set to 1 and the macro exits without doing anything else. 4. Othereise,mailing labels are printed. 5. The command GET_FORM_LIST FORMS gets your form list. It is put in the variable FORMS. Later,specific fields in the FORMS variable are used,such as FORMS.NUMBER which is the number of forms in your database. 6. The command DO i=1 TO FORMS.NUMBER WHILE(FORMS.i.NAME~='DISPLAY ALL');END; means "step through all of the forms from the first to the last(forms.number) looking for the form with the name DISPLAY ALL. This is a rather sophisticated command that shows some of the real power in the ARexx language. If you don't completely understand this statement,don't worry. You can just use this statement for now without completely understand it. Later,you can read the ARexx manual about the DO command to learn more. 7. The command FORMS.PRINT_FORM1=i sets the current PRINT FORM1 to DISPLAY ALL. 8. The command PUT_FORM_LIST FORMS installs the new form list that you have set up. The PRINT FORM1 was changed just as if you dragged the form and dropped it into the slot. 9. You are asked to put in regular paper. 17-5 10. If you click on "No",the macro exits,else it prints. RUNNING AN MACRO IN A FILE So far you have only run macros that you have typed directly into Microfiche Filer Plus. As your macros get larger and more complicated,you will want to put them into separate files. You may still run these macro files from within MFF by simply typing the macro's name instead of typing a complete program as in the above examples. If the macro's filename ends with '.mffm' you can simply type the first part of the name and ignore the '.mffm' extension. In this example,you will run a macro called 'dial' which can dial a phone number that you have in the database. If you have a modem and turn it on,you can actually listen to it dialing! If you have no modem,just run the example anyway;it won't hurt anything. 1. Select a single record in the address book that you would like to dial. 2. Choose EDIT & RUN MACRO 1 from the MACRO menu. 3. Type DIAL. 4. Click on the RUN MACRO button. Another pair of useful macros that we have provided for you are the 'export' and 'import' macros. The export macro writes a file that consists of one line for each record that contains all of the fields in each record separated by TABs. This is a format that is used by several other Amiga programs for import and export. The import macro reads the same file format that the export macro and some other Amiga programs produce. 1. Select several records. 2. Choose EDIT & RUN MACRO 1 from the MACRO menu. 3. Hit the ESC key to clear the macro. 4. Type EXPORT. 5. Click on the RUN MACRO button. 6. When asked,enter the filename RAM:EXPORTFILE and hit RETURN. A file called RAM:exportfile has been created. Now let's import it to be sure that it really worked! 1. Choose EDIT & RUN MACRO 1 from the MACRO menu. 2. Hit the ESC key to clear the macro. 3. Type IMPORT. 4. Click on the RUN MACRO button. 17-6 5. When asked,enter the filename RAM:EXPORTFILE and hit RETURN. Now you see another copy of each of the records that you exported! You can go and edit these macros to change the format,change the separation character,and so on. You now have absolute flexibility when importing and exporting information for other applications! SUMMARY Using permutations of these few macros and the other sophisticated macros that we have provided on the disk,you can automate many of your databasing tasks. Using the more sophisticated features of ARexx even allows you to perform sophisticated import and export of data and communication with other applications. For a more thorough understanding of macro programming in Microfiche Filer Plus: 1. Read the next chapter for more of the dirty details of ARexx programming,as well as a listing of all of the Microfiche Filer Plus commands in detail. The next chapter also includes a table of the Microfiche Filer Plus macro commands and error codes. 2. Read your ARexx manual for a more thorough description of the ARexx programming language. 3. Look through the macros on your disk for more insight into this unique language. 4. Experiment! 17-7 CHAPTER 18 - MACRO REFERENCE GUIDE Microfiche Filer Plus contains a complete ARexx macro language interface. ARexx macros can be executed from within MFF,or MFF can act as a server and field ARexx requests from external ARexx macros and applications. This chapter will get very technical for awhile,but,if you would like,you can skip forward to the command descriptions for information on each of the commands that MFF supports. We will not attempt to teach you ARexx here;that is up to you! But we will describe all of the special features that MFF provides in your ARexx environment. It is much,MUCH easier to develop macros when you have started Microfiche Filer Plus from the CLI rather than from the Workbench. When you start from the CLI and run a macro in MFF,any output from that macro(including error messges)will show up in your original CLI window. When you start from the Workbench,there is no place for these messges to go! Later,after you have developed the macro,it usually makes no difference whether you run it from an MFF started from the CLI or the Workbench. MACRO FILES You have the option of typing short macros directly into Microfiche Filer Plus. For longer,more complex macros,you must put them into a separate file. You may edit these files using your favorite text editor. A word processor won't do unless it has the capability of generating an ASCII file. If you don't have a favorite text editor,you can use 'ed' or 'edit' which are on the workbench disk. These macro files should have the extension '.mffm' for "Microfiche Filer Macro". These files may either be in your current directory,or in the rexx: directory,if you have set one up. Read ARexx manual for more infomation on this. The only differences between typing a "string file" macro directly into Microfiche Filer Plus and typing it into a separate file are that in the separate file: You don't need to surround the macro with quotes. You MUST begin your macro file with a comment(a description surrounded by the comment characters slash star(/*) and star slash(*/)), An example would be "/" This is a quick macro "/". 18-1 SYNCHRONOUS vs. ASYNCHRONOUS MACROS In the asynchronous mode,Microfiche Filer Plus can act as a server in an ARexx environment,fielding harmless commands and performing useful,but simple tasks for external macros. An external macro may make a request of MFF by sending a command to Microfiche Filer Plus's server port. This is completely asynchronous;MFF will respond(when it has time)to a single request by one macro,then,when done,may respond to another request from a completely different macro. MFF will only perform harmless commands asynchronously. All of the really sophisticated commands,though,require the complete attention of Microfiche Filer Plus. An external macro may ask MFF to LOCK into a synchronous conversation with it. All macros executed directly from within Microfiche Filer Plus are automatically LOCKED. When LOCKED in synchronous communication with a macro,MFF ignores all server requests and responds only to the synchronized macro. To understand why this is necessary,imagine that your macro is stepping through a list of selected records,reading and updating them. If this done asynchronously,another macro could step to the next record, or modify the records without the knowledge of the first macro. Clearly,this would wreak havoc with the state of the system,not to mention that data would probably be lost! Each MFF invocation has a public server port called MFF_SERVER# with # being a unique number such as 1. This public server port is available for communication with external macros that want MFF to perform a service. An external macro must send commands to this port using a form of the ARexx ADDRESS command,such as ADDRESS MF_SERVER1 DISPLAY 'HI!'. This performs a single command,in this case the DISPLAY command. The server number of each invocation of Microfiche Filer Plus is displayed in the title bar of the screen. When an internal macro is invoked or an external macro asks for a LOCK,another port is created with a unique name that is for the temporary use of that macro. While MFF is communicating with that macro,the rest of the world is locked out of MFF(except for the USER ABORT gadget that appears on the screen). MFF is "locked in synchronous communication" with this macro. The communication link is broken and the port is removed when either the macro exits(f it was run from within MFF)or the macro issues the UNLOCK command. For example,the following macro will work only if run from the MACRO menu in MFF: SELECT_NONE; SEL.2.CRITERION = '<88/01/01'; SELECT_BY_FIELD SEL; 18-2 This macro will work only if run from the CLI or another application communicates with MFF through the server port: OPTIONS RESULTS' ADDRESS MFF_SERVER1 LOCK; IF (RC ~=0)THEN DO; SAY 'I COULD NOT GET A LOCK';EXIT;END; ADDRESS VALUE RESULT; SELECT_NONE; SEL.2.CRITERION = '<88/01/01'; SELECT_BY_FIELD SEL; UNLOCK; Open the address_book.mff database in the Macros directory,then run the FANCYTEST.REXX macro from the CLI by typing RX FANCYTEST to see an example of an external macro locking MFF into synchronous communication. This type of external communication is most useful when simultaneously running several applications that support ARexx,and having them communicate directly! The macro may grab the address out of a record in the database and paste it into your work processor,print it,and grab another address for instance. Dynamic mailmerge! Or,a macro might instruct your communications program to dial up a local computer system,download your mail,break it up into pieces,put the messages into a database,and sort them by date and time for quick reading later! There is actually one more way to spark a synchronous conversation. Any time MFF receives a command that it does not recognize,it loops the command back out and starts a conversation with that macro,as if you ran the macro from within MFF. This may be an extremely useful feature when used with ARexx "string files"(but watch out for nested quotes!). RUNNING A MACRO UPON STARTUP To run a macro immediately upon startup of Microfiche Filer Plus,use the -m option in one of the following formats: mff -m my_macro mff -m my_macro my_database mff my_databse -m my_macro MACRO COMMANDS All commands that are flagged as HARMLESS can be executed directly by sending a command to the server port. All other commands may be executed only when in synchronous communication. Here is a list of all of the MFF commands organized functionally. If the command is marked as harmless,the command can be executed in server mode. Arguments may be:cv-compound variable,or s-string. A return code is always returned,which is 0 when successful and non-zero when not. A cv-compound variable,or s-string may also be returned. 18-3 HARMLESS COMMAND ARGUMENTS RETURN YES get_data_def cv cv NO first NO next NO get cv cv NO put cv NO add cv NO delete [quietly] YES get_blank cv cv NO select_all NO select_none NO select_by_field cv NO move_selected_to_front YES get_form_list cv cv NO put_form_list cv NO sort YES get_print_options cv cv NO put_print_options cv NO print NO print_current_record NO load_database s NO save_database s NO exit_to_workbench [quietly] NO abandon_to_workbench [quietly] NO exit_to_file_view [quietly] NO abandon_to_file_view [quietly] NO exit_and_load_database [quietly] s NO abandon_and_load_database [quietly] s YES display_picture s YES display s YES request s YES string_request s s YES lock s NO unlock ERROR CODES Every command returns a result in the reserved variable called "rc". The return codes are roughly categorized as: <20 -informative 20-99 -syntax,context,or user errors >=100 -FATAL 18-4 ERROR # ERROR DESCRIPTION 0 OK 1 NOTOK 2 END_OF_LIST 50 REQUIRES_RESULT_FLAG 51 NOT_A_HARMLESS_CMD 52 NO_ARGUMENT 53 BAD_VARIABLE 60 NO_DATABASE_LOADED 61 DATABASE_ALREADY_LOADED 62 CANNOT_LOAD_DATABASE 63 CANNOT_SAVE_DATABASE 64 CANNOT_EXIT 70 NOTHING_SELECTED 71 BAD_FORM_REFERENCE 72 PRINTING_ERROR 73 INVALID_PREFERENCE 74 CANNOT_DISPLAY_PICTURE 75 INVALID_PICTURE_OPTION 76 NOTHING_TO_UNLOCK 77 ALREADY_LOCKED 100 NO_AREXX_LIBRARY 110 NO_MEMORY 120 BAD_ENVIRONMENT 130 NO_STACK_SPACE 200 ABORTED COMMAND DESCRIPTIONS The following sections list,in alphabetical order,all of the Microfiche Filer Plus commands that are accessible through ARexx. ABANDON_AND_LOAD_DATABASE [QUIETLY] S Closes down any currently loaded database,and loads another. If the database was modified,the user is asked first. If the keyword 'quietly' is used,the user is not asked,and the database is abandoned,then the specified database is loaded. This command is MUCH faster than ABANDON_TO_FILE_VIEW;LOAD_DATABASE 'FOO';! EXAMPLE: ABANDON_AND_LOAD_DATABASE QUIETLY 'DATABASE2'; 18-5 ABANDON_TO_FILE_VIEW [QUIETLY] Abandons changes and exits to the File View. If a loaded database was modified, the user is asked first. If the keyword 'quietly' is used,the user is not asked,and the database is abandoned. EXAMPLE: ABANDON_TO_FILE_VIEW; IF (RC ~=0)THEN DO;SAY 'CANNOT LEAVE';EXIT;END; LOAD_DATABASE 'ANOTHER_DB'; ABANDON_TO_WORKBENCH [QUIETLY] Abandons changes and exits to the Workbench. If a loaded database was modified,the user is asked first. If the keyword 'quietly' is used,the user is not asked,and the database is abandoned. The port is closed after this command! EXAMPLE: ABANDON_TO_WORKBENCH QUIETLY; ADD CV Adds a record to the database using the contents of cv. The fields must be set up as described in the GET command. Any unspecified fields are set to the default values. You should usually first do a GET_BLANK,then change the fields,then do an ADD to save yourself some work. EXAMPLE: DO i=1 TO 5; GET_BLANK REC; REC.1.VALUE = 'NEW RECORD'; REC.2.VALUE = i; ADD REC; END; DELETE [QUIETLY] Deletes all currently selected items in the database. If the keyword 'quietly' is used,the user is not asked,and the data is immediately deleted. EXAMPLE: SELECT_NONE; SEL.2.CRITERION = '<88/01/01'; SELECT_BY_FIELD SEL; DELETE QUIETLY; DISPLAY S Displays the string and waits for the user to click OK. EXAMPLE: DISPLAY 'CLICK OK TO CONTINUE'; 18-6 DISPLAY_PICTURE S Displays the specified IFF file until the user clicks on it. EXAMPLE: DISPLAY_PICTURE 'KING_TUT'; EXIT_AND_LOAD_DATABASE [QUIETLY] S Closes down any currently loaded database,and loads another. If the database was modified,the user is asked first. If the keyword 'quietly' is used,the user is not asked,and the database is saved if it had been modified,then the specified database is loaded. This command is MUCH faster than EXIT_TO_FILE_VIEW;LOAD_DATABASE 'FOO';! EXAMPLE: EXIT_AND_LOAD_DATABASE 'DATABASE2'; EXIT_TO_FILE_VIEW [QUIETLY] Exits to the File View after closing down any open database. If the database was modified,the user is asked first. If the keyword 'quietly' is used,the user is not asked,and the database is saved if it had been modified. EXAMPLE: EXIT_TO_FILE_VIEW QUIETLY; LOAD_DATABASE 'ANOTHER_DB'; EXIT_TO_WORKBENCH [QUIETLY] Exits to the Workbench after closing down any open database. If the database was modified,the user is asked first. If the keyword 'quietly' is used,the user is not asked,and the database is saved if it had been modified. The port is closed after this command! EXAMPLE: EXIT_TO_WORKBENCH QUIETLY; IF (RC ~=0)THEN SAY 'ERROR WHILE SAVING THE DATABASE!'; FIRST Positions the 'current record' pointer to the first selected item. EXAMPLE: FIRST; GET REC; 18-7 GET CV Gets the contents of the current record. The contents are returned in the compound variable. The field types may be determined using the GET_DATA_DEF command. The contents may be retrieved as: cv.NUMBER -the number of fields in the record for each field(# is to be replaced by the filed number) if TEXT,NUMBER,or CALC field cv.#.VALUE -the value of the field(as a string) if PICTURE field cv.#.FILENAME -the picture filename cv.#.STATUS -the picture's status 0 - NO_PIC 1 - NOT_READ 2 - NOT_FOUND 3 - NOT_AN_ICON_FILE 4 - NOT_A_PIC_FILE 5 - NO_MEMORY 6 - IN_CHIP_RAM 7 - IN_FAST_RAM cv.#.COLOR_TABLE -the picture's color translation table colors 0-3 cv.#.BACKGROUND_COLOR -the background color colors 0-3 or NO_BACKGROUND_COLOR('70'x) cv.#.SQUEEZE_TYPE -the squeezing strategy 1 - Quick squeeze 2 - Quality squeeze 3 - Truncate 4 - Don't load cv.#.COLOR_MAPPING_TYPE -the color translation strategy 1 - Map by Color 2 - Map by Intensity 3 - Map by Contrast 4 - Truncate colors 5 - Map Manually cv.#.STRETCH -whether to allow stretching or not 1 - Allow stretching 2 - Don't allow stretching EXAMPLE: GET_DATA_DEF DD FIRST; DO WHILE (RC=0); GET REC; IF (DD.1.TYPE='TEXT')THEN SAY REC.1.VALUE; IF (DD.1.TYPE='PIC')THEN SAY REC.1.FILENAME; NEXT; END; 18-8 GET_BLANK CV Gets a blank record. All of the fields are filled in with the default values. You should usually do this before performing an ADD command. EXAMPLE: GET_BLANK REC; REC.1.FILENAME='BIG PICTURE'; REC.2.VALUE='JUST THE DEFAULT PICTURE'; ADD REC; GET_DATA_DEF CV Gets a great deal of information about the currently loaded database. The information is returned in the compound variable. The information may be manipulated within the macro as: cv.NUMBER -the number of fields in the database cv.FILENAME -the filename of the current database cv.VERSION -the version number of the MFF for each field (# is to be replaced by the field number) cv.#.NAME -the field name cv.#.TYPE -the field type:TEXT,NUM,PIC or CALC cv.#.FORMULA -the field formula cv.#.CRITERION -the current selection criterion for this field EXAMPLE: GET_DATA_DEF DD DO i=1 TO DD.NUMBER; SAY 'FIELD' i 'IS NAMED' DD.i.NAME 'AND ITS TYPE IS' DD.i.TYPE; END; GET_FORM_LIST CV Gets the names of all of the existing forms and a list of which forms are being used for what. The format is: cv.NUMBER -the number of existing forms. cv.PRINT_TITLE -the number of the form currently in the 'print title' slot cv.PRINT_FORM1 -the number of the form currently in the 'print form1' slot cv.PRINT_FORM2 -the number of the form currently in the 'print form2' slot cv.PRINT_FORM3 -the number of the form currently in the 'print form3' slot cv.PRINT_TOTALS -the number of the form currently in the 'print totals' slot cv.SORT -the number of the form currently in the 'sort' slot cv.EDIT -the number of the form currently in the 'edit' slot cv.DISPLAY -the number of the form currently in the 'display' slot for each field(# is to be replaced by the field number) cv.#.NAME -the name of each form EXAMPLE: GET_FORM_LIST FORMS; FORM_NUMBER=FORMS.DISPLAY; SAY 'THE DISPLAY FORM IS' FORMS.FORM_NUMBER.NAME; 18-9 GET_PRINT_OPTIONS CV Gets the current print options settings. They are: cv.TITLE -whether a title is to be printed 1 - no title 2 - title on first page only 3 - title on its own page 4 - title on every page cv.NUM_FORMS -number of print forms to use 1 - use only print form 1 2 - use print forms 1 and 2 3 - use print forms 1,2,and 3 4 - use print forms 1 and 2 horizontally cv.NUM_COLUMNS -one or multiple columns setting 1 - one column 2 - many columns cv.RECS_PER_PAGE -one or multiple records per page 1 - one record per page 2 - many records per page cv.CONTINUOUS_FEED -use continuous feed paper 1 - print on continuous feed paper 2 - print on single sheets cv.PAGE_PERFORATIONS -skip or ignore 1 - skip past page perforations 2 - ignore page perforations cv.TOTALS -whether totals will be printed 1 - no totals 2 - print totals cv.BLANK_SPACE -whether blank space generated 1 - no blank space between records 2 - print blank space between records cv.NUMBER_OF_COPIES -the number of copies to print cv.FILENAME -filename used for "printing to a file" EXAMPLE: GET_PRINT_OPTIONS OPTIONS; OPTIONS.NUMBER_OF_COPIES=5; PUT_PRINT_OPTIONS OPTIONS; LOAD_DATABASE S If MFF is in the File View,it loads the specified database. The trailing '.mff is optional. If not included,it is added. EXAMPLE: LOAD_DATABASE 'ADDRESS_BOOK'; IF (RC ~=0)THEN SAY 'I COULDN'T LOAD THE DATABASE!'; 18-10 LOCK This command is only valid when executed by an external macro to MFF in server mode. MFF returns the name of a private port to use for further communication. MFF will respond only to your commands until you issue the "unlock" command. YOU MUST SET THE RETURN VALUE FLAG BEFORE EXECUTING THIS COMMAND(by executing the "options results" ARexx command). The private port name is returned in the special variable 'result'. EXAMPLE: OPTIONS RESULTS; ADDRESS MFF_SERVER1 LOCK; IF (RC ~=0)THEN DO;SAY 'I COULD NOT GET A LOCK';EXIT;END; ADDRESS VALUE RESULT; FIRST; GET REC; SAY REC.1.VALUE; UNLOCK; MOVE_SELECTED_TO_FRONT Performs a 'move selected items to front' operation exactly as if it was done from the menu. The database is immediately redisplayed. EXAMPLE: SELECT_NONE; SEL.10.CRITERION='!=512K'; SELECT_BY_FIELD SEL; MOVE_SELECTED_TO_FRONT; NEXT Moves the 'current record' pointer to the next selected item. Returns the END_OF_LIST error if there are no more. EXAMPLE: FIRST; DO WHILE (RC=0); GET REC; SAY REC.1.VALUE; NEXT; END; PRINT Performs a 'print' as if 'print' was chosen from the PRINT menu,using the print forms and the print options. EXAMPLE: GET_PRINT_OPTIONS OPTIONS; OPTIONS.NUMBER_OF_FORMS=2; PUT_PRINT_OPTIONS OPTIONS; PRINT; 18-11 PRINT_CURRENT_RECORD Prints the current record only,using the print forms and the print options. EXAMPLE: SEL.1.CRITERION='PARENTS'; SELECT_BY_FIELD SEL; FIRST; PRINT_CURRENT_RECORD; PUT CV Replaces the current record with cv. The fields must be set up as described in the GET command;however,it is not necessary to set the 'cv.NUMBER'field. Any unspecified fields are set to the default values. You should usually first do a GET,then change the fields,then do a PUT so as not to destroy any other data. When putting a picture field,set cv.#.READ_PICTURE to '1' if you wish to immediately read and squeeze the picture. EXAMPLE: GET_DATA_DEF DD FIRST; DO WHILE (RC=0); GET REC; IF (DD.1.TYPE = 'TEXT')THEN REC.1.VALUE = UPPER(REC.1.VALUE); IF (DD.1.TYPE = 'PIC')THEN REC.1.SQUEEZE_TYPE = 1; PUT REC; NEXT; END; PUT_FORM_LIST CV Adjusts which forms are in which slots. Uses the same format as the GET_FORM_LIST command;however,it is not necessary to set the 'cv.NUMBER' field or the 'cv.NAME' fields. EXAMPLE: GET_FORM_LIST FORMS; DO I-1 TO FORMS.NUMBER WHILE(FORMS.I.NAME ~="DISPLAY ALL"); END; FORMS.PRINT_FORM1=I; PUT_FORM_LIST FORMS; PRINT; PUT_PRINT_OPTIONS CV Installs the print options. Uses the same format as GET_PRINT_OPTIONS. EXAMPLE: GET_PRINT_OPTIONS OPTIONS; OPTIONS.PAGE_PERFORATIONS=2; OPTIONS.FILENAME='RAM:PRINT.FILE'; PUT_PRINT_OPTIONS OPTIONS; 18-12 REQUEST S Displays the string and waits for the user to click either OK or NOTOK and returns that result to ARexx. EXAMPLE: REQUEST 'SHALL I GO ON FROM HERE?'; IF (RC~=0)THEN EXIT; SAVE_DATABASE [QUIETLY] If a database is loaded,it is saved. If the keyword 'quietly' is used,the user is not asked,and the database is saved immediately. EXAMPLE: SAVE_DATABASE QUIETLY; SELECT_ALL Selects all of the records in the database. EXAMPLE: SELECT_ALL; FIRST; DO WHILE (RC=0); GET REC; SAY REC.1.VALUE; NEXT; END; SELECT_BY_FIELD CV Performs a 'select by field' operation exactly as if it was done from the menu. The current selection criteria is available by using 'get_data_def'. A null string or nonexistent criterion causes that field to be ignored. The format of the compound variable is: cv.#.CRITERION -the criterion,as entered normally EXAMPLE: GET_DATA_DEF DD; IF (DD.6.CRITERION = ") THEN DD.6.CRITERION = '<20'; SELECT_BY_FIELD SEL; 18-13 SELECT_NONE Deselects all of the records in the database. EXAMPLE: SELECT_NONE; SEL.2.CRITERION ='=BEATLES'; SEL.3.CRITERION ='=NUMBER 1 HIT'; SELECT_BY_FIELD SEL; FIRST; DO WHILE (RC=0); GET REC; SAY REC.1.VALUE; NEXT; END; SORT Sorts the data based on the current sort form. EXAMPLE: GET_BLANK REC REC.1.VALUE = 'FOO'; ADD REC; SORT; STRING_REQUEST S Displays the string and waits for the user to enter a string which is returned to ARexx. YOU MUST SET THE RETURN VALUE FLAG BEFORE EXECUTING THIS COMMAND(by executing the "options results" ARexx command). The string is returned in the special variable 'result'. EXAMPLE: OPTIONS RESULTS; STRING_REQUEST 'ENTER A STRING:'; IF (RC~=0)THEN EXIT; SAY 'YOU TYPED' RESULT 'INTO THE REQUESTER!'; UNLOCK Releases the synchronous communication channel that you received when you issued the "lock" command. Any further attempt to communicate using that private port will result in your termination! EXAMPLE: OPTIONS RESULTS; ADDRESS MFF_SEVER1 LOCK; IF (RC~=0)THEN DO;SAY 'I COULD NOT GET A LOCK';EXIT;END; ADDRESS VALUE RESULT; GET_BLANK REC; REC.1.VALUE='FOOBAR'; ADD REC; UNLOCK; 18-4 CONCEPTS FOR NEW USERS - A The first thing to do is to read the "Introduction to Amiga" manual that came with your Amiga to learn to use the mouse,to get around the Workbench,to use menus,and so on. The following terms will come up over and over in this guide,so you should be familiar with them. KEYS Press a key means to push,then release the key. Hold a key means to push and hold down the key. Anytime you are asked to press SHIFT and some other key(such as SHIFT-RIGHT ARROW)it means to hold the SHIFT key,then push and release the other key(such as RIGHT ARROW),then release the SHIFT key. The left and right shift keys are identical; you can use either one. When you are pressing keys,be careful to press and then quickly release the key. If you hold the key down for too long,it will "repeat" meaning that you will have effectively pressed the key several times. It can be quite surprising to suddenly see a field filling up with 'A's because you held the 'A' key down rather than releasing it! THE MOUSE Click means to move the mouse to point at something on the screen, then press and release the left mouse button. Double click means to move the mouse to point at something on the screen, then click the left mouse button twice without moving the mouse. Shift click means to move the mouse to point at something on the screen, hold down the SHIFT key,then click the left mouse button. Grab means to point at something on the screen using the mouse, push and hold the left mouse button. Grabbing is a precursor to dragging. Drag means to grab something on the screen,and,while holding the button down,move the mouse which drags the item on the screen. A-1 Drop means to release the mouse button after dragging something which drops it wherever the mouse points. Choose a menu item means to hold down the right mouse button(which displays the menu line at the top of the screen),move the mouse up to the menu line and across until the appropriate menu is displayed move the mouse down the menu until the appropriate item is highlighted,then release the button. You will learn later about menu shortcut keys which can be used instead of using the mouse to choose a menu item. THE ACTIVE WINDOW On the Amiga,only one window at a time is considered "active". When you type, the keys go to the active window. When you choose a menu item,the menu that you see is for the active window. The active window is the window whose name you can read clearly(at the top of the window). All other windows have the name "ghosted"(you cannot read it clearly). To activate a window,simply click on it. To be safe,you should click in the title bar(at the top of the window)or in the "Front" gadget(in the upper right corner). Clicking anywhere in the window actually activates the window; but,unless you are careful,you may actually click in an object in the window which may have an unwanted effect. The active window is only important to you if you are typing or making a menu selection. If you need to click on something in one of the windows,just click on it and the window is automatically activated. If you type something and it affects the wrong window or if you push the right mouse button and no menu appears or the wrong menu appears,you must activate the correct window. A-2 IMPORT AND EXPORT - B Microfiche Filer Plus provides several ways to pass data between different programs. TEXT FILE EXPORT If you want to extract simple,fixed format text from your database to use in another program(e.g. a mail merge program),use the Print to file print option. See Chapter 15 - Printing for more information. TEXT FILE IMPORT To import simple,fixed format text from another program into Microfiche Filer Plus,use the Text Import Utility in the Utilities drawer in the MFF_Files drawer. The instructions on how to use the Text Import Utility are also in the drawer. DATA TRANSFER USING AREXX If you have ARexx,the most interesting and effective way to pass data between applications is by running an ARexx macro that directly passes the data between two programs that support ARexx. Once you have written the macros,you can just hit a key to pull data out of your database and put it directly into a word processing document,for example. An ARexx macro could also create a text file from your data for use with applications that don't support ARexx. In fact,we provide two macros named IMPORT.MFF and EXPORT.MFF in the macros directory that do exactly that! You may use them directly or modify them to your own liking. B-1 TIPS AND SHORTCUTS - C Here are a few tips and shortcuts which you may find useful. QUICK DATA ENTRY After you have created your Data Defintion and set up your forms,usually you want to enter a large anount of data to fill the database. Constantly reaching for the mouse is counterproductive at this point. Also,sorting and redisplaying the data after each record is unnecessay. Here is a quick way to enter lots of data without having to touch the mouse. 1. Set the confirm preference to DO NOT confirm when saving data. 2. Set the Sort order preference to Don't sort. 3. Make the Microfiche Magnification window the active window. 4. Add a blank record by pressing RIGHTAMIGA-B. 5. Enter the data. 6. Save the data and add another blank record by pressing RIGHTAMIGA-B. 7. When you are done,just save the record without adding another blank one by pressing RIGHTAMIGA-X. Note that you can use RIGHTAMIGA-C rather than RIGHTAMIGA-B to edit successive copies of the record rather than successive blank records. DETERMINING THE TOTAL NUMBER OF RECORDS Oftern,it is interesting to know how many records are currently in your database or how many records are currently selected for printing. To easily do this,you should keep a Print Totals form that has two fields: A Text field that is wide enough for four or five digits,and a Description field that says "records are selected". Now,to find out how many records are in your database,select them all,then choose DISPLAY TOTALS ON SCREEN from the PRINT menu. This opens a window that says something like "123 records are selected". KEEPING THE FIELD CONTENTS FOR REFERENCE If you have a field defined that you fill with long or complex text,you may wish to have the previous contents of the field available for scrutiny while you are editing it. To do this,simply build a form that includes the field to be edited and,following it,include that field again. When editing using that form,you are able to edit the first copy of the field,but not the second. The second field cannot be edited,but you can refer to it while editing the "real" copy. C-1 TROUBLESHOOTING - D OUT OF MEMORY Occasionally,Microfiche Filer Plus may tell you that there is not enough memory to accomplish something. Right away there are a few things to do that may free some memory so that you can get on with your work. Change the Number of colors preference to Two colors for data. Delete any other windows that you have open on the Workbench. Delete files in RAM:. Stop other programs that are running. Shrink the Microfiche Magnification window and the Form List window. Sometimes Microfiche Filer Plus tells you that you are out of memory,but it appears that you really have some left. There are two possibilities here: you may have some memory left,but it is "Fast" RAM,not "Chip" RAM and "Chip" RAM is required for the operation(such as opening a window). The second possibility is that,yes,you do have some memory left,but it is fragmented. In a multitasking machine like the Amiga,it is possible for programs to use pieces of memory here and there until only many small pieces of memory(or fragments)are available. The total abount of memory may seem to be enough to accomplish something,but no single hunk of memory that is large enough is available. If this happens,first try saving your work and leaving MFF,then starting it up again. If the problem persists,try rebooting your system and starting again from scratch. Sometimes the memory situation gets so bad that you cannot even pull down a menu to save your database and exit. The first thing to do is to try freeing some memory following the guidelines above. Next,try using the menu shortcut keys instead of pulling the menu down with the mouse, If this fails,it is time for the EMERGENCY SAVE AND EXIT. You accomplish this by typing RIGHTAMIGA-E(but only try this if all else fails!). If you are having trouble loading a database because it is too big,try all of the measures described above;and,if it still will not load,there is one more possibility. Set the MEMORY PARANOID preference to NOT PARANOID - DON'T KEEP WINDOW AROUND. Getting rid of this window may free just enough memory to load that large database. Be aware that you may not be able to do much with it other than scan it,though. D-1 MFF SEEMS SLOW If you are running MFF on the Workbench screen and if the redrawing of the window borders seems to take a very long time when you move a window,try closing some of the other windows that are open on the Workbench. This usually speeds things up. Alternatively,you can run MFF on its own screen. If you are trying to enter a lot of data and are tired of your data being sorted and redisplayed often,read the section titled Quick Data Entry in Appendix C - Tips and Shortcuts. If it seems to take a long time,you may wish to change the PICTURE LOADING preference to DON'T LOAD PICTURES WHEN OPENING. This is a very useful way to load a big picture database,locate what you are looking for,then load only those pictures. D-2 QUICK REFERENCE - E UP ARROW move up DOWN ARROW move down LEFT ARROW move left RIGHT ARROW move right SHIFT-UP ARROW beginning of text SHIFT-DOWN ARROW end of text SHIFT-LEFT ARROW beginning of line SHIFT-RIGHT ARROW end of line BACKSPACE delete backward DEL delete forward SHIFT-DEL delete line ESC delete all ENTER or RETURN insert a NEWLINE(depending on your preferences) SHORTCUT KEYS TAB NEXT FIELD RETURN or ENTER NEXT FIELD(depending on your preferences) SHIFT-TAB PREVIOUS FIELD SHIFT-RETURN or SHIFT-ENTER PREVIOUS FIELD(depedning on your preferences) UP ARROW cycle up DOWN ARROW cycle down In a requester: LEFTAMIGA-V left button COMMODORE-V left button RIGHTAMIGA-V left button LEFT AMIGA-B right button COMMODORE-B right button RIGHTAMIGA-B right button RETURN default button ENTER default button E-1 SELECTION CRITERIA text ANYWHERE <>text ENDS WITH =text EQUAL TO >text GREATER THAN