ME/2 - A PM-Based Editor for OS/2 Preliminary Documentation - 09/04/94 ------------------------------------ For "Quick Start" use with MR/2, see the end of this document. Thanks for trying ME/2, a PM-based editor meant to be used in conjunction with either of my mail reader products, MR/2 and MR/2 PM. I think it's also quite handy as a general purpose editor, too. This is a PM based editor using a Multiple Document Interface (MDI). That means you can have multiple documents open at one time, each in a sizeable window. I have improved on this a bit by allowing an option where window sides are logically connected or "sashed". Features -------- o MDI Interface. Toolbar, Status bar, dynamic menus. o Many user-configurable options saved in an INI file and remembered across sessions. o Remembers last 4 documents edited. o Integrated with MR/2's spelling checker and thesaurus. o Many message-writing specific features are available. o Controllable by MR/2 via "remote control" - appears to be an "internal" editor while remaining a separate app. Session switching is performed automatically. o Enhanced tiling with "sashing" windows (adjacent windows resize to stay adjacent to resized window). o There's more! This is a preliminary release, although it works nicely and my list of planned enhancements is small (I've done almost everything I wanted to do). It takes a while to load this thing (similar to loading E or EPM), mostly because of the loading of sizable DLL's. Once I get the remote control logic working it will preload once (for MR/2 and MR/2 PM) and be callable almost instantly via remote control commands. This will make it a practical choice for reply editing. NOTE that the spelling checker and thesaurus are functional, but limitted to the amount of work they will perform without the existance of a valid MR2.ID file. You get one of these by registering. The accelerator key table is sumarized below. Note that *some* of these keys interfere with the ALT+key processing of the main menu. I'll fix this. Alt-Backspace, UNDO Shift-Delete, CUT Control-Insert, COPY Shift-Insert PASTE Control-F FIND TEXT F3 QUIT *** Control-O OPEN FILE Control-S SAVE FILE Control-C CLOSE FILE Control-N NEW FILE Control-P PRINT FILE Alt-X SAVE ALL and Exit *** Control-V VIEW FILE (Open for read-only) Alt-W WRITE BLOCK Alt-R READ BLOCK Control-A SELECT ALL Alt-C FAST COPY Alt-M FAST MOVE Alt-D FAST DELETE Alt-N NEXT FILE/WINDOW Alt-# #=1 thru 9 jump to document #n. Control-# #=1 through 0 to insert a variable. *** In remote control mode, these keys equate to save and close all, followed by a "hide window", if ME/2 was started in a hidden state. The application is not exited at this time. The "fast" copy/move/delete functions work similar to the way they do in my text mode editors, only across windows. ALT-C will copy whatever was left marked in the last window accessed, to the current cursor position. No need to copy, then paste. Ditto for Fast-mode, accept this is equivelant to a CUT, then PASTE. Required Files -------------- There are three DLL's included totalling about 550K (sorry :( ). These need to be placed into a directory listed in your LIBPATH *or* the ME/2 directory needs to be added to your libpath. It requires OPMBC20A.DLL, BSEBC20A.DLL and the Borland runtime DLL, C215MT.DLL. Command Line Parameters ----------------------- How about an example: ME2 /R /F8 c:\mr2\Snips.txt /M /F0 c:\reply.msg Loads ME/2, sets read-only mode with /R, sets the window font to font 8, opens snips.txt, sets modify file mode, resets the font to system proportional and opens c:\reply.msg for editing. The files are "Tiled" by ME/2 when more than two are loaded on startup. Specifically: /R Sets READ ONLY mode on. Any documents opened after this will be view-only. The /M command can be used to turn modify mode back on. /M Sets MODIFY mode on. Any documents opened after this will be editable. The /R command can be used to turn READ ONLY mode on, protecting a file from modifications. /- Hide the editor. Used for remote control purposes to keep it off the desktop when not in use. /+ Show the editor. Used for remote control purposes to show it on the desktop when needed and in a hidden state. /P Invokes ME/2 in remote control mode. /C0F Sets the colors for subsequent new windows. First hex digit is the foreground color, second is the background. Follows the ME/2 color dialog from left to right, then top to bottom (upper left corner is 0, lower right corner is F). 0 - White 8 - DarkGray 1 - Black 9 - DarkBlue 2 - Blue A - DarkRed 3 - Red B - DarkPink 4 - Pink C - DarkGreen 5 - Green D - DarkCyan 6 - Cyan E - Brown 7 - Yellow F - PaleGray /IC:\me2.ini Sets the name of the INI file that ME/2 uses to store things like window positions, fonts, colors and setup/view options. ME/2 looks first for this "forced" file name. If not specified, ME/2 looks for the environment variables ME2DATA, then MR2DATA. If it finds the first, or the later, then it access/creates its ME2.INI file there. If none of this has yet resolved the INI path, ME/2 creates ME2.INI in the current directory. /T Tiles documents in the default manner. Used by the remote control process. /H Tile horizontally, used by remote control ONLY. You may specify a whole-number percentage to allocate to the "top" document (last one opened) by using /H75, for example. Values must be between 20 and 80. /V Tile vertically, used by remote control ONLY. You may specify a whole-number percentage to allocate to the "top" document (last one opened) by using /V75, for example. Values must be between 20 and 80. /Fn Sets the current font for use with the NEXT document to be opened. See list of available values below. Fonts ----- While ME/2 supports user-selection from a standard OS/2 font selection dialog box, only certain combinations may be specified via parameter. For command line selection, the following numeric codes are available: 0 - SystemProp, 16 - HelvOLB, 1 - Courier8, 17 - HelvOLBI, 2 - Courier10, 18 - TmsRmn8, 3 - Courier12, 19 - TmsRmn10, 4 - CourierOL, 20 - TmsRmn12, 5 - CourierOLI, 21 - TmsRmn14, 6 - CourierOLB, 22 - TmsRmn18, 7 - CourierOLBI, 23 - TmsRmn24, 8 - Helv8, 24 - TmsRmnOL, 9 - Helv10, 25 - TmsRmnOLI, 10 - Helv12, 26 - TmsRmnOLB, 11 - Helv14, 27 - TmsRmnOLBI, 12 - Helv18, 28 - SysMono10, 13 - Helv24, 29 - SysMono12, 14 - HelvOL, 30 - SymbolOL 15 - HelvOLI, Known Problems -------------- o Rewrapping and quoting options need work. Paste-quote, too. o My ALT-# remapping interferes with QuikSwitch. o No way to interrupt a thesaurus "search for word" process. Perhaps later. o Spelling checker only updates the window after an entire line is checked. Even then, there's a bug that hides a modified line. It's there, and it comes back as soon as the window gets control. This is merely a cosmetic. o Sashing windows don't work correctly if you slide one window border over a second window completely, past the frame of a third. Don't do this :) Also, since byte-aligment is on by default, minor gaps or overlaps might occur. I'll keep fine tuning. o Max all, Min all do strange things to the subsequent use of the individual window min/max buttons. o Tab processing needs to be reviewed. Tabs In, Tabs Out and Tab Pressed. o The Bottom scrollbars option takes effect ONLY when the next window is opened. I tried dynamically changing all the existing windows, but it failed. o No Help. Some buttons and/or menu items greyed out (for example, the append-with-section dialog has no code yet; it's still just an idea :). o The INSERT menu will include remote-control specified entries. This, of course, is not yet working. o Insert SYMBOL. The chart is neat, but due to differences in the font displayed in the dialog and that of the document, you don't always get what you pick :) o No way yet to replace the "next" occurence of a string after the first hit is found. o I can't seem to trap the F10 key and make it work like both of the MR/2 internal editors (F10 means save and exit). Ideas ----- o Auto Saving on time interval. o Quote ratio in status window. o PGP integration. Using with MR/2's Spell Checker and/or Thesausus Databases ---------------------------------------------------------- Yes, you can use those large word databases that you download for use with MR/2's internal editor. In fact, you can use the same copies. Here's how ME/2 tries to find the file(s) needed: 1. Looks for an environment variable called ME2DATA or MR2DATA (either will work). You may use one of these to set the path for the two data files (e.g., "SET MR2DATA=C:\MR2" in your config.sys) 2. ME/2 looks in the directory where ME2.EXE resides. 3. The current directory is checked. 4. The parent directory is checked (e.g., "..\mr2thsrs.bin"). If the needed file is not found after all these checks, ME/2 merely beeps at you, then ignores you :) NOTE that this same procedure is used to locate your MR2.ID file, if you have one. If a valid MR2.ID file is found, the spelling checker and thesaurus become fully functional. Otherwise: o The spelling checker will only hcek 50 words at a time. o The thesaurus can be activated only once per session. o The thesaurus will only allow a word search 3 levels deep. REGISTRATION ------------ Here's how this works. ME/2, the editor, was developed as an add-on utility for my set of MR/2 QWK compatible mail readers (MR/2 "classic" text-mode and MR/2 PM). As the editor became more polished, I realized that it showed usefullness as a general purpose editor. Registered users of MR/2 and/or MR/2 PM are already registered for ME/2. Anyone registering either of these mail readers in the future will also be automatically registered for ME/2. In fact, the $25 registration fee covers MR/2, MR/2 PM and ME/2. NOTE THAT ME/2 is a slightly crippled in a non-registered state. The Spelling checker will check only 50 words per invocation, however, you are free to check an entire document. You simply mark and bound 50 words at a time :). The thesaurus is also crippled in that you can use it only once per session, and it will only traverse a word list to three levels. If ME/2 sees a valid MR2.ID in its directory or one pointed to by the environment variables MR2DATA or ME2DATA, it will allow full access to the spelling checker and thesaurus. So, if you care to use just ME/2, it still costs you $25. You will receive MR/2, MR/2 PM and the supporting spelling and thesaurus databases. You will also received an MR2.ID file and the latest ME/2. IF REQUESTED ENOUGH, I MAY OFFER A ME/2-ONLY REGISTRATION DEAL. Let me know if this appeals to you. I may offer an API in some way ... telling other programmers how to use ME/2 in remote control mode. We'll see if folks think it's a decent editor, first. Just to plant the bug in your ear, this *is* possible, so it you like ME/2 but not MR/2 or MR/2 PM ... integration with your reader-of-choice *could* be possible :) ME/2 Quick Start - Using it NOW with MR/2 and MR/2 PM ----------------------------------------------------- 1. Set an environment variable in config.sys to point to your MR/2 directory, MR2DATA=C:\MR2 (or whatever is correct for your system). Reboot yoru system. Alternatively, you may set this value by hand, or via a CMD file, when needed. NOTE: This is to provide access to MR/2's thesaurus and spelling checker word databases. It also identifies a directory in which to place the ME2.INI settings files. 2. Unzip ME2 into a directory. C:\me2, for example. 3. Modify your MR2.INI's "Editor=" entry. For example: Editor=C:\me2\me2 NOTE: MR/2 looks for "ME2" anywhere inside the editor string and sets up remote control operation. This may interfere with other editor setups. I'll find a better way quickly. 4. DO NOT CLOSE THE EDITOR after replying. Use ALT-X to save and exit all files. F3 also works, but ALT-F4 or clicking on the close icon will not. Some helpful, more advanced hints: * A more complex editor setup might look something like this: SourceFile=C:\source.msg Editor=C:\me2\me2 /C02 /F18 /R c:\source.msg /M /C01 /F0 %s /H75 This opens the quoted source message in one window, read-only, using an 8 point font and white-on-blue text. It then opens the reply file in modify mode, uses the default system font, and sets the color to white-on-black. The screen is then tiled horizontally, with the reply taking up 75% of the window. Unfortunately, there's a bug that keeps the other file from auto-adjusting. It's there, visible, and accessable, tho. SourceFile is a new INI setting. Quoted text is placed here, the reply file starts as defined by your templates, with no quoted text. o Also, you may pre-load ME/2 before MR/2 does to obtain more control over its initial settings. For example, MR/2 starts ME/2 in hidden mode and hides it after finishing a reply. You might setup a command file for MR/2 that will change this behaviour like so: Start /b ME2.EXE /I:C:\ME2.INI /P mr2 This will cause ME/2 to always remain displayed on the desktop. You would still use ALT-X or F3 to save your documents.