@database "Envelope" @width 80 ## $VER : Envelope Guide 1.13 @node main "Envelope Guide" @{b}Envelope Printer Guide@{ub} ----------------------- Version 1.13 12th May 1998 WARNING : READ THE DISCLAIMER BEFORE USE @{" Introduction " link Intro} @{" Disclaimer " link Disclaimer} @{" Licence " link Licence} @{" Requirements " link Requirements} @{" Usage " link Usage} @{" Tooltypes " link Tooltypes} @{" Preferences " link Prefs} @{" Address Book " link AddressBook} @{" Custom Initialisation " link CustomInit} @{" Arexx " link Arexx} @{" Bugs " link Bugs} @{" History " link History} @{" Future " link Future} @{" The Author " link Author} © 1997-8 Jason Brown @endnode @node Intro "Introduction" Introduction ------------ Over Christmas 1996, my typewriter became terminally ill. The only thing I used my typewriter for was to address envelopes. So until I could get a new typewriter in the New Year, I decided to use my computer and printer. However, I very quickly got tired of loading a word processor just to type out an address (especially if I was low on memory and had to quit what I was doing at the time). So I decided to write a quick program that would print out the addresses for me, thus Envelope was born. Envelope is very simple. It prints addresses onto envelopes. It is also small program. Envelope fully functions as a commodity. Envelope is also fully font-sensitive and font-selectable. @endnode @node Disclaimer "Disclaimer" I M P O R T A N T Although I have tested the program thoroughly and although the program code is very simple, this software is supplied with no form of warranty or guarantee whatsoever. USE IT AT YOUR OWN RISK This does not only apply to crashing a machine with important work being done on it, but also if an important envelope is misaddressed. In the end you must check any envelope as soon as it is printed for any errors. I will not be held responsible for any losses incurred by an important envelope getting lost in the post because it was misaddressed. YOU HAVE BEEN WARNED!!! @endnode @node Licence "Licence" Licence ------- You are free to copy, distribute etc. Envelope as long as the archive is not modified in any way and all files are kept intact and no charge other than reasonable disk copying charges is made. @endnode @node Requirements "Requirements" Requirements ------------ Machine ------- Envelope was programmed and tested on a A4000, so should run on an A1200 without any problems. Furthermore Envelope should run on any machine with Kickstart 37+ (AmigaDos v2 or higher), but since I do not have one of these to hand I have been unable to test this for sure. If there are any problems then please contact the @{" Author " link Author}. Envelope will not run on AmigaDos v1.3 or lower Envelope is fully font sensitive. If the font requested does not fit onto the screen, then Topaz/8 will be used. Memory ------ Envelope is designed to use as little memory as possible, so it can if need be remain in memory permanently. However, one thing to remember is that because Envelope uses the standard printer device, then this will consume approximately 40K when opened if no other program has used the printer device. If memory is low and an error occurs (such as trying to open the main window when there is not enough memory) then Envelope will quit completely. This 'feature' was originally a bug, but I decided to leave it in because if memory is that low, then you will need to quit out of something anyway. @endnode @node Usage "Usage" Usage ----- Envelope can be started from either Workbench or CLI. See @{" Tooltypes " link tooltypes} You will be presented with a requester which will open on the default public screen (almost always Workbench). This screen will also be brought to the front. There are six string gadget into which you should type the name and address of the person you wish the envelope to be addresses to (although you can type whatever you like for that matter). There is a checkbox below these. If you have not set a sender's address in the @{" Preferences " link Prefs} then this will be ghosted and you don't need TO worry about it. If you have entered these details, then the state of the checkbox dictates whether the sender's address will be printed. There are five gadgets at the bottom. They are fairly self-explainatory but just in case:- SEARCH - This will search the address book for anything contained in the first line of the main address. Simply press the button again for subsequent searches. PRINT - This prints the data contained in the string gadgets onto an envelope. Envelope first re-initialises the printer, then performs six linefeeds, prints the appropriate data in Boldface, then performs a Form Feed to eject the envelope. Envelope currently indents the address 33 spaces. PREFS - This will open a preferences window. See @{" Preferences " link Prefs} It was a bit of a crush making sure that it fitted onto a 640*200 NTSC screen (does anyone use this mode), but on larger screens Envelope will increase the spacing, thus improving the look. BOOK - This opens the address book window. From here you can keep commonly used addresses. QUIT - Quits @endnode @node Tooltypes "Tooltypes" Tooltypes --------- These are the Tooltypes allowed. If a Tooltype is in brackets, then it is in effect 'switched off' and is ignored by Envelope (the same is true for all programs). For CLI startup, simply use the keywords below in the command line. You may run more than one version of Envelope at once. So you could have different Tooltypes set for different versions. CX_HOTKEY The Hotkey combination to open the window. If this is not set it will default to 'ctrl lalt e'. CX_POPUP If this is set to YES, then the requester will 'popup' when first loaded. If set to NO, then Envelope will hide in the background until the hotkey is pressed or called as a commodity. Default is YES. CX_PRIORITY Set the priority of the commodity within the commodities broker. This is not the same as the TOOLPRI Tooltype however. TOOLPRI The programs priority. Defaults to 0 and I wouldn't mess around with it too much. PREFSFILE Where Envelope should look for it's preferences file. If this is not set, Envelope will look in ENV: then PROGDIR: @endnode @node Prefs "Preferences" Preferences ----------- You can open the preferences window by clicking on the Prefs button in the main window. You can also edit the preferences by loading the @{" PrefsFile " link PrefsFile} into a text editor. Sender Information ------------------ Sender Here you can enter six lines of the Sender's Address. No other lines will be added, so you may wish to pu "Sender:" on the first line. Style Select the print style for the Sender's Address Xpos The position of the Sender's Address Ypos Print This controls the state of the Print Sender's Address checkbox in the main window. Main Information ---------------- Style Select the print style for the Main address Xpos The position of the main address. Try not to include silly Ypos values so that the Sender's Address is printed on the same line. Other Information ----------------- Init1 See @{" Custom initialisation " link CustomInit } for more details Init2 Device By default Envelope prints to PRT: However, you can select a different device, say PRT2: Window Title You can change the main window title here. This is useful if you have different versions of Envelope for different sized envelopes, different sender's addresses (business & personal) etc. By setting a different title, you can easily tell which is which. Addresses The filename of the address book to use. Screen Font Check this gadget if you wish to have the screen font. Otherwise click on the Choose button (you will have to uncheck the checkbox first). If a window can't be opened because the font you have chosen is too large, then Envelope will revert to Topaz/8. Although this shouldn't happen with the main window, it could happen with the preferences window on smaller screens with larger fonts. Who said you needed MUI for font sensitive requesters ;-) Buttons ------- Use - Updates the settings and then closes the prefs window. Save - Updates the settings, saves them, then closes the prefs window Test - Updates the settings, but keep the prefs window open. Ideal for tweaking some settings. Cancel - Closes the prefs window, and reverts the settings back to what they were when the prefs window was opened. @endnode @node PrefsFile "PrefsFile" Preferences File ---------------- You can, if you wish, edit the preferences by loading the preferences file into a text editor). These are the keywords that it currently supports. To temporarily "turn off" a command, simply put any character before it, like an asterisk (e.g. "*FONT topaz" will be ignored). Note, that Envelope will completely remove these lines when saving it's own preferences. FONT If you do not wish to use the default screen font, you may type in the name of another font in here. It must be in the format "times.font 11" (without the quotes). The font name must include .font, followed by one space and then the font size. ADDRESSX Where to position the main address. These used to be called ADDRESSY LEFTEDGE and LINEFEEDS. SENDERX As above, but for the Sender's Address. SENDERY WINTITLE The main window title. INIT1 Initialisation data. Same as the equivalent commands in INIT2 the preferences window. PRINTSENDER Controls the state of the checkbox in the main window. If set to YES, the checkbox will be checked, but you can still print the sender's address by selecting the checkbox before printing. You must set some senderline data however SENDERSTYLE Four options are allowed. NORMAL, BOLD, ITALIC, CONDENSED. ADDRSTYLE You can mix them together eg BOLDITALIC, but NORMAL will clear all styles. ADDRSTYLE is the main address style and SENDERSTYLE is the Sender's Address. SENDERLINE1 The lines of the address of the sender. 2, 3, 4 etc DEVICE By default Envelope prints to PRT: However, you can select a different device, say PRT2: ADDRESSBOOK The filename of the address book to be used. @endnode @node AddressBook "Address Book" Address Book ------------ You can maintain an address book of commonly used addresses. Buttons ------- Add Adds a new entry to the address book << Moves backwards by one entry >> Moves forwards by one entry Delete Deletes the current entry Get Gets the address in the main window and places it in the current address entry Put Puts the information in the address entry into the main window address. Save Saves the address book. Menus ----- Open Opens a new address book. Save As Saves the current address book under a different name Restore Restores the current entry Sort Sorts the address book. Only sorts on the first name. Envelope stores the address files using a TSV method. This means that it should be possible to generate files from existing database programs farily easily. Here's the process. Envelope reads for a TAB between each field and a Carriage Return to move to the next field. Only six fields are allowed. All others are ignored. @endnode @node CustomInit "Custom Initialisation Codes" This section covers the Init1 and Init2. With these two gadgets you can control extra data sent to the printer. For instance, if you wish to print in a different colour, or print in Landscape mode, or any other printer specific code. Init1 is sent to the printer BEFORE anything is printed and Init2 is send to the printer at the end. As a general rule, you should use Init2 to cancel any settings made in Init1. To find out the codes, you will have to look through your printers manual. You need the code sequence to switch an option on (which you put in Init1) and the sequence to turn the option off (which you put in Init2). Only decimal figures are allowed. No binary or Hex. If you wanted to use Landscape mode you would do the following Put "27, 38, 108, 49, 79" in Init1 (to turn Landscape on) Then put "27, 38, 108, 48, 79" in Init2 (to turn Landscape off) Experiment and see what happens. Whilst experimenting, remember to switch your printer off after every attempt to clear any settings you may not have cancelled. If you get find any useful codes, send them to me and I can include a preset for other users. Presets ------- Here are the currently defined presets Keyword Code Sequence Function -------------------------------------------------------------------- HPLandscapeOn 27,38,108,49,79 Turns on Landscape printing HPLandscapeOff 27,38,108,48,79 Turns off Landscape printing @endnode @node Arexx "Arexx" Arexx ----- Envelope supports Arexx. The default port name is ENVELOPE.1, the second ENVELOPE.2 and so on. Up to nine different programs can be run at once. These are the supported functions PUTADDRESS ie PUTADDRESS 1 "Nelson Mandela" HIDE Hides the Interface SHOW Shows the Interface PRINT Prints the envelope QUIT Have a Guess !! OPENPREFS Opens prefs window. No harm will be done if already open. CLOSEPREFS Closes prefs window. No harm will be done if not open. USEPREFS Closes prefs window, but keeps any changes (but doesn't save) SAVEPREFS Saves current preferences You can also adjust all of the settings from Arexx. To do this just prefix the keywords in the @{" PrefsFile " link Prefsfile} with SET. eg SETLINEFEEDS 16 Sets the linefeeds to 16 SETWINTITLE "Arexx Window Title" Sets the window title SETFONT xhelvetica.font 11 Changes the font The SET commands will not have any effect if the preferences window is open however and will return a Warn to the Arexx sender, so it's best to perform a CLOSEPREFS first. One thing to remember is that Arexx converts characters to upper case unless you enclose the in quotes. So although the top example would still work without the quotes it would end up as NELSON MANDELA instead of Nelson Mandela @endnode @node Bugs "Bugs" Bugs ---- - I can't test the HPLANDSCAPE function since I don't have one of these printers. Let me know how it works. - I've had reports of Envelope ejecting a blank envelope on systems running Turboprint. Again, since I don't have Turboprint it could be difficult to track down. If you are running Turboprint without this problem, please let me know. I've had reports that the spool options can cause some problems. If something does go wrong then please contact the @{"Author" link Author} Try to send as much information as you can about your system (machine WB, KS, patches etc). And remember to include the version of Envelope you are running. @endnode @node History "History" 26/01/98 Version 1.10 - Source code completely transferred from AmigaE to ANSI C. You may note that the executable is some 4K smaller than the previous version (and this version has the extra enhancements below). - Envelope will now look for PROGDIR:Envelope.prefs instead of PROGDIR:!Envelope.prefs (slip of the finger when typing in the path :) Envelope will also rename any files for some users that spotted this and renamed the prefs files themselves. - Hiding the interface now saves the data in the address fields for the next time it is opened. - Changing the Window Title just refreshes the main window instead of closing and re-opening the window. - Envelope will automatically correct any out of range figures in the preferences window (Leftedge & Linefeeds) as long as Return or Tab is pressed after the data has been entered. - If you have a custom prefs file in ENV: then Envelope will also save a copy to ENVARC: as well (and vice versa). - CLI startup should now work properly. - Removed some OS3.0 only code. 28/02/97 Version 1.11 - Fixed a memory problem (a consequence of transferring from AmigaE to ANSI C). I'm amazed it never crashed. - Implemented configurable Sender's Address position. This should help those with HP printers. Also renamed Linefeeds & Leftedge to X Pos & Y Pos to match the Sender's Address names (which are probably better suited). Also renamed the appropriate keywords in the @{" Prefsfile " link prefsfile} - Partially fixed the Cancel/Test problem. It was much harder than I first thought. Took a complete rewrite of the way preferences are handled internally. Not absolutely perfect though. See @{" Bugs " link Bugs} - Added a Clear button. This clears all of the address fields to make it easier to enter another address. This button won't stay there. It's just there until I get the menus sorted out. - Finally gave in to all the requests and made the Return button move the cursor down to the next string gadget (only for the address lines) - Some changes to the preferences GUI 24/04/97 Version 1.12 - Implemented custom initialisation code. - Implemented the Address Book. There are still a few things to do here (search funtions), but it should function pretty well already. - Added Menus. Moved the Clear & Hide buttons to the Menus. - You can now load and save different prefs files via the Prefs window menu. Removed the Test button from the prefs window (it never worked properly anyway) and added a Last Saved menu option instead which should do virtually the same job (and was easier to implement). - Fixed CX_PRIORITY tooltype which never worked. I doubt anyone would have ever noticed anyway. - Opening the Prefs window now blocks the main window from input. - Since most memory allocations are small, Envelope now allocates memory from the top (MEMF_REVERSE). This should help avoid serious memory fragmentation. - Envelope now looks in PROGDIR: for a prefsfile FIRST, then in ENV: if none is selected. - The HPLANDSCAPE preset has now been renamed to HPLandscapeOn and HPLandscapeOff. Envelope will automatically adjust your prefs file for this version, but you have to save the changes. 12/05/97 Version 1.13 - Added a search function for the Address Book - The save reminder on the Address Book now works properly - Included "Bubble Up" and "Bubble Down" functions in the Address Book menus so you can move entries within the address book. - Pressing Return in the Address Book string gadgets now moves the cursor down. - Added keyboard shortcuts for the Address Book window. - Empty fields are now handled properly in the Address Book and when printing. - Fixed some Enforcer hits (at last) - Fixed a bug in the freeing of menu resources (related to above problem) @endnode @node Future "Things for future releases" Future ------ Ideas for the future. There's really not a lot left to do. - A converter program to convert Organiser TSV files for easy use in Envelope. How many Envelope users use Organiser ? - Extra presets. - Possible MUI & ClassAct version. To be honest, I don't think this is nessesary. I do find writing font-sensitive GUI's very easy indeed (take a look at the prefs window), but if I get enough demands for it, I will certainly consider it. @endnode @node Author "The Author" Contacting the Author --------------------- If you wish to send me bug-reports, requests, etc. my E-Mail address is jason@albatross.co.uk Other programming projects :- AminetConverter - available on Aminet --------------- Converts Aminet INDEX files into files that can be easily imported into database/spreadsheet programs. Task Control - available on Aminet ------------ A program that handles task priorities. Whilst there may be other programs available that do this task, because this is the sole function of Task Control, it can be done very quickly and easily. @endnode @endnode