1i Foreigner Version 2.00 L.G. Goldsborough 1991,1992 Suppose you want to use the copyright symbol that appears above in a word processing document. One way to get it is to press and hold the Alt key while typing the number 0169 (don't forget the leading zero). Of course, who can remember the numbers for all the possible "special" characters. An alternative, one that I used for a while, is to make a table that you keep next to your keyboard. Of course, this still requires you to look up the number then type it in. There must be a better (and cheap) way! There is. Foreigner is a Windows utility I wrote to simplify the use of the characters that do not appear on standard American keyboards. And it works with virtually all program windows that accept text, including those used for entering filenames in File-Open and File-Save dialog boxes. Rather than remembering the 4-digit numbers for all the characters you need, simply run Foreigner. It will display a keypad of buttons with all the available characters in the high-ANSI and symbol character sets. Press the button with the character you want and that character will be copied to the Windows clipboard. Then, shift back to your application and paste the character in from the clipboard (using either the program's Edit-Paste command or the Shift-Insert key sequence). That's it! Note: The current version of Foreigner does work without a mouse but you must use the arrow keys or the Tab and Shift-Tab keys to select the character you want. It is much easier (and faster) to use a mouse to select the desired button. So my advice is: BUY A MOUSE! Foreigner is similar in function to the CharMap utility included with Windows 3.1. However, in my humble opinion, it is superior in several ways: 1. Foreigner has a "Keep at top" option that enables you to keep it visible on your screen at all times, so it's much quicker to access the characters you need regularly. There is no need to bring up the Windows task list or to wade through a pile of overlapping windows to find it. 2. Foreigner's main window is resizeable (using either the keyboard or the mouse), so you need only display those characters you use, not the entire character set. You can, for example, have an unobtrusive single row of buttons along the bottom of your screen (this is my preferred configuration). 3. Foreigner allows you to create custom character sets (using characters from the regular ANSI or the Windows symbol sets) containing only those characters you use regularly, reducing the screen clutter of a large window. 4. Foreigner supports direct pasting, which enables you to select a character from Foreigner's main window then point at the window to receive that character with the mouse. One mouse click and it's thereno need for Edit-Paste commands. 5. Foreigner remembers where you left it on the screen the last time you moved it, and reopens at that place. So, if you want to have a "character bar" along the bottom of your screen at all times, you can. Program Installation To install Foreigner, simply copy the file FOREIGN.EXE into your Windows directory (or some other directory, if you prefer) and, optionally, create an icon in a Program Manager group (see the Windows documentation if you don't know how to do this). If you want Foreigner to execute every time you enter Windows, edit the LOAD= line of your WIN.INI file to include LOAD=FOREIGN.EXE. The options that you set in Foreigner's system menu will be saved in your WIN.INI under the section entitled [Foreigner] so they will remain in effect next time Foreigner is run. See the section entitled "Configuring Foreigner" below for more information. If you use Foreigner with a word processor that supports user-defined macros (such as Microsoft Word for Windows or Lotus Am Professional), you may wish to write a macro to execute Foreigner directly from within the program using a menu command or keystroke. For example, the following macro (named InsertForeignCharacter) works with Word for Windows versions 1.1 and 2.0: Sub MAIN Shell "C:\WIN3\FOREIGN.EXE", 1 End Sub You will need to change the directory in the Shell command above to the one in which you install FOREIGN.EXE, unless it is in a directory included in your DOS PATH environment variable. I installed this macro so it is appears at the bottom of the Insert menu (as "Foreign Character...") of my copy of Word but, of course, this is up to you. If you are unsure how to use macros, read the documentation that accompanies your word processor (or whatever program you are using). Program Options There are three options that are set in Foreigner's system menu in the upper left corner of its main window. When an option is set, a checkmark will appear to the left of the menu command and the current setting of the option (on or off) will be saved in WIN.INI when Foreigner is closed (so that the same option settings will be in effect when you run Foreigner next). The options are: 1. Action on press When a button is pressed to copy a character to the clipboard (or paste directly to an app, depending on the setting of option #2) and this option is set, Foreigner can be reduced to an icon on the Windows desktop or it can be closed. Alternatively, if you select "Keep at Top", Foreigner will do its darndest to remain on the top of the pile with no other windows covering it (even it is reduced to an icon). Which of these three events occurs depends on which item in the submenu of this option (Minimize or Close) you chose. 2. Character set This option selects which character set Foreigner displays in its window. The choices are: high-ANSI, symbol (part 1), symbol (part 2), or user-defined. These sets may be selected using keyboard accelerators: control-A for high-ANSI, control-S for symbol (part 1), control-Y for symbol (part 2), or control-U for user-defined. 3. Paste direct to app After pressing a button in Foreigner, the mouse cursor will change to a crosshair. You then point with the mouse to a window visible on the Windows desktop that you want to receive the character, click the left button, and the character will be pasted into that window (assuming it is a window that accepts character input). The mouse cursor will change back to its former type and the window receiving the character will get the input focus. If you are using Foreigner with a word processor and you write a macro to run Foreigner in response to a menu command (such as described above), a convenient setup would be to turn on options #1 (particularly "Keep at Top") and #3. Then you could type in the word processor, pop up the Foreigner window (or simply point to it, if it's on top), and two mouse clicks later, continue typing where you left off. Since selection of the window to receive the character requires a mouse, option #3 is only available if you have a mouse installed. No mouseno direct paste. When this option is selected, the character usually bypasses the Windows clipboard (thereby saving its present contents from destruction, as occurs when the character is copied to the clipboard). Be aware, however, that not all windows that may receive the character from Foreigner will recognize it (e.g., graphics applications). Most of these will simply ignore it. If you find one that doesn't play nicely with Foreigner when direct pasting, let me know. Some windows may disallow some characters. For example, some filename input boxes do not allow entry of characters that would make an illegal DOS name. Note that direct paste works with most windows but it does not work with some dialog box controls, such as filename entry controls in File-Open boxes. However, you can still open the dialog box, switch to Foreigner, copy a character to the clipboard, then switch back to the application and use the Shift-Insert key sequence to paste the character in from the clipboard. If you change your mind after pressing one of Foreigner's buttons, press the escape key, the right mouse button, or if you have a three button mouse, the middle or right button. Any of these will cancel the direct paste. Note, however, that some utilities that capture the mouse (such as Number & Co.'s Whiskers) may interfere with the ability of these buttons to cancel a direct paste. An alternative way to cancel a paste is to left-click on a window you know can't process the character input, such as the Windows desktop or a window caption (or even Foreigner itself). Important note: Foreigner will try to send the associated typeface along with the character when direct pasting characters from the symbol sets, if the receiving application recognizes Microsoft's Rich Text Format clipboard format. However, not all applications will do so. If not, this will mean that if you select a character from the symbol set in Foreigner then paste it into an application, its appearance once it arrives there will be determined by what typeface is "active" at the time. You may need to manually change the character to the symbol typeface in the application. So don't panic if the character you get doesn't initially look like the one you selected in Foreigner. Be sure to set the "Paste symbols" checkbox in Foreigner's About box to enable Rich Text Format pasting. Selecting a character set Originally, Foreigner only supported the 96 visible characters in the high end of the standard ANSI set. However, as a number of users pointed out, there are plenty of useful characters in the Windows symbol set that it would be handy to have ready access to. Also, there are characters in the high ANSI set that serve special purposes in certain applications (such as Alt-0150 and Alt-0151 which provide the em-dash and en-dash in Word for Windows) which are invisible in most applications. Starting in version 1.10, Foreigner supports multiple character sets. Foreigner comes with three predefined character sets, which are selected using the "Character set" command in the system menu. The "High ANSI" set provides the same characters as before, although they are now displayed in a more readable sans-serif typeface rather than the system default. The "Symbol (pt1)" set contains half of the visible characters in the Windows symbol set, while the "Symbol (pt2)" set provides the rest. A fourth option is "User defined", which initially provides you with up to 96 blank buttons that can be set to any character in either the ANSI or symbol set. To define a character in the User-defined set, press and hold the CONTROL key while clicking the button you want to define (or press the space bar while holding the control key). A dialog box will appear in which you enter the following information: 1. the character set (ANSI or symbol) to which the character belongs 2. the actual character, which will be displayed in the combo box below the character set box 3. if you prefer, you can type in the code number for the character you want (you must enter a value between 1 and 255; Foreigner won't let you enter anything else); this is not necessary, however, if you select a character in step #2 4. optionally, a name to be associated with that character (normally, you would leave this blank for visible characters but you might want to type something here for characters that are only visible in certain applications, such as the em-dash or en-dash in Word) As you enter the above information, a sample of the new button's appearance will be displayed. When you have entered valid information, press the Define button, and that character will appear (or will replace whatever was on that button previously). Press the Cancel button, and any changes you have made will be ignored. When you exit Foreigner, the definitions for your user-defined keys will be saved in a file called FOREIGN.CHR in the Windows directory on your hard drive. Okay, you ask. If I want to type in my own code numbers instead of simply selecting the character from Foreigner's character set combo box, how do I find the number for the character I want? Well, you refer to the tables below. Find the character you want then combine the one or two digits in the row in which it appears with the one digit in its column. For example, the code for in the ANSI character set is 181. Bear in mind that certain characters might look different from what appears below in certain applications. ANSI character set: 0 1 2 3 4 5 6 7 8 9 1 2 3 ! " # $ % & ' 4 ( ) * + , - . / 0 1 5 2 3 4 5 6 7 8 9 : ; 6 < = > ? @ A B C D E 7 F G H I J K L M N O 8 P Q R S T U V W X Y 9 Z [ \ ] ^ _ ` a b c 10 d e f g h i j k l m 11 n o p q r s t u v w 12 x y z { | } ~   13 14 " " o 15 - - 16 17 18 19 20 21 22 23 24 25 Windows symbol character set: 0 1 2 3 4 5 6 7 8 9 1 2 3 ! " # $ % & ' 4 ( ) * + , - . / 0 1 5 2 3 4 5 6 7 8 9 : ; 6 < = > ? @ A B C D E 7 F G H I J K L M N O 8 P Q R S T U V W X Y 9 Z [ \ ] ^ _ ` a b c 10 d e f g h i j k l m 11 n o p q r s t u v w 12 x y z { | } ~   13 14 " " o 15 - - 16 17 18 19 20 21 22 23 24 25 An important caveat on the use of symbol characters is that, unless your receiving application recognizes Rich Text Format, Foreigner sends only the actual character to your application but not an associated typeface. So, once again, don't panic (or worse, swear under your breath at the humble programmer) if the character you get doesn't initially look like the one you selected in Foreigner. Performance concerns? By adding support for the Windows symbol font and user-defined character sets in version 1.10, the complexity of drawing the buttons in Foreigner's main window increased greatly. This, in turn, lead to a performance penalty. If you have a fast 386, it is probably not noticeable. However, for those with more meager CPUs, the delay may become intolerable. If so, I offer the following suggestions: 1. Use the user-defined character set for your characters whenever possible. This way, you only display the characters you use regularly (probably less than the maximum 96 per screen that Foreigner allows) so the speed of screen updates is improved. This has the additional benefit that it eliminates hunting through all 96 buttons since you can put the characters you use exactly where you want them. Also, you can include characters in the user-defined character set which do not appear in any of Foreigner's predefined sets. 2. If you do not need characters from the Windows symbol set, continue using version 1.02 of Foreigner, which updates its main window slightly faster. Alternatively, you can manually edit your Windows configuration file (WIN.INI), as described in the "Configuring Foreigner" section below, to display characters using the Windows system font. 3. Buy a faster computer. Configuring Foreigner Regrettably, Foreigner cannot be all things to all people. However, it is possible to configure Foreigner to better meet your needs. The more commonly used configuration options are available within Foreigner, while the more arcane ones can be set by manually editing the Windows configuration file, WIN.INI. 1. Window size By default, Foreigner displays 96 buttons in its main window. If you prefer to decrease this (particularly if you use the user-defined character set with only the characters you use regularly), open Foreigner's About dialog box (using the "About Foreigner" command in its system menu) and set the values in the two fields. Be aware that the product of the number of rows by the number of columns cannot exceed 96 and the number of rows and columns cannot exceed the number that can be displayed acrosss the display screen at one time (if you cannot enter a number above a certain value, it is probably because Foreigner has determined that there is not enough screen space for the number you are trying to enter). You can also resize Foreigner by clicking and dragging the mouse on one of its window borders. Once again, it only allows resizes in a limited range, so that no more than 96 buttons are displayed simultaneously. 2. Action on press The "Action on press" command in Foreigner's system menu allows you to determine what happens to Foreigner when you select one of its characters. The "Close" command will cause Foreigner to exit after a command is pressed. The "Minimize" command simply iconizes it on the desktop. A nifty new feature in version 2.00 is the "Keep at top" option, which attempts to keep Foreigner from being covered by other windows on the desktop. This option works under Windows 3.0 and Windows 3.1, although it uses a different method under 3.1 that is, in my opinion, more aesthetically pleasing. The method used for Windows 3.0 may fail if there are two many applications using system timers. If so, you will not be able to keep Foreigner on top. Note: The "Keep at Top" option means exactly that. On my system, running Windows 3.1, literally nothing will cover Foreigner's main window when this option is selected. This includes most screen blankers, which looks rather odd, since Foreigner will appear on top of the fireworks etc. 3. Character set This command determines which of the four sets of 96 buttons are displayed in Foreigner's main window. The Hi ANSI set includes the characters not generally available on most North American keyboards. The Symbol sets (parts 1 and 2) include 192 of the characters in the Windows symbol typeface. The user-defined set presents you with 96 blank buttons, that can be customized with any character from either the ANSI or Symbol typeface (all 256 of each). 4. Paste symbols In version 2.00, Foreigner passes character information to the Windows clipboard in basic CF_TEXT format (as in preceding versions) and, if the character is from the symbol set, in Microsoft's Rich Text Format (RTF). This means that it is now possible to pass the typeface along with the actual character when direct pasting to an application, if that application recognizes RTF. If direct paste is activated, the character is first sent to the clipboard in RTF, then an "Edit-Paste" command is automatically issued to the receiving application to paste it innot really pretty but it works! If you find that characters do not pass through to your application correctly, you can turn off RTF support by unchecking the "Paste symbols" checkbox in Foreigner's About box. Be aware also that the left and right curly braces ({ and }) are used for special purposes by RTF, and the current version of Foreigner does not allow these characters to be copied to the clipboard (or pasted directly to an application) if "Paste symbols" is turned on. 5. WIN.INI settings (for the "roll-your-own" crowd) If you are comfortable mucking around with your Windows system configuration file (WIN.INI), you can set several additional features about Foreigner. Bear in mind, however, that you may inadvertently do damage, either to Foreigner or to the entire system when you do this. If you have never modified WIN.INI manually, you may want to consult the Windows manuals before proceeding. Foreigner's configuration information is contained in the [Foreigner] section of WIN.INI. The various variables, and some typical values, are as follows: [Foreigner] ShowFonts=1 ActionOnPress=3 CopyToApp=1 CharSet=3 NumRows=2 NumCols=33 XPos=2 YPos=507 PasteRTF=1 The setting of ShowFonts will determine how fonts will be displayed on Foreigner's buttons; if set to 0, the Windows system font will be used and the speed at which Foreigner's main window will be displayed will be increased (albeit sacrificing display of symbol characters). Setting ShowFonts=1 or deleting this line reenables font display. The value for ActionOnPress determines Foreigner's response to a keypress. The possible values are as follows: 0 = nothing will happen, 1 = minimize, 2 = close, 3 = keep at top. The CopyToApp flag determines if direct paste capability is enabled (1 = true, 0 = false). CharSet is the number of the character set that is displayed by default each time Foreigner is executed (0 = hi ANSI, 1 = Symbol (part 1), 2 = Symbol (part 2), 3 = user-defined). NumRows and NumCols are the number of rows and columns, respectively, to be displayed (be sure not to set these values so their product exceeds 96, or unpredictable things may happen). XPos and YPos are the X and Y coordinates on the screen where Foreigner was when it was last executed (so it will always reappear where you left it the last time); again, be sure not to set these values larger than the actual dimensions of your screen (in pixels). PasteRTF determines whether symbols are copied to the clipboard in Rich Text Format (1 = true, 0 = false). Note that changes to WIN.INI may not take effect immediately so it may be necessary to restart Windows after making these changes. Program History Version Comments 0.90 This version began life as a part of another Windows program I wrote (Bookworm - a flat-file database program for bibliographic informationcontact me if you're interested) that, on request from a user, I extracted and made a standalone application so it could be used by other Windows apps. 1.00 First distributed version of the program. 1.01 Modified code so an attempt to execute a second copy of Foreigner simply brings the existing copy to the top of the desktop. This greatly simplifies the macro needed to bring up Foreigner from Word (and presumably other programs). Previously, WIN.INI was updated every time Foreigner was closed. Now, that file is updated only if options have been changed during the session. Changed the crosshair cursor so it is easier to distinguish from one used by other programs (the default Windows-supplied crosshair). 1.02 Added ability to close Foreigner altogether as an alternative to minimizing it after a key is pressed. This resulted in a change to the description of the first option in the system menu and the addition of a submenu. A flag in WIN.INI is also renamed. 1.10 Major update to the program. Support for the Windows symbol font and user-defined character sets is added. 1.11 Fixed a bug that prevented the symbol font from being displayed on systems without an "on-the-fly" screen font generator (e.g., ATM or FaceLift); I guess I just assumed everyone used these things... 2.00 Foreigner's first major overhaul; changes were so many that I'm not sure if I remember them all: a) Foreigner's use of system resources is reduced b) the icons of some other applications (e.g., Postman, Winwhere) are no longer clobbered by Foreigner, as they used to be c) the main window is now resizeable, using the controls in the About box or with the mouse d) a new "Keep at Top" option is added e) support for direct paste to Ami Professional is added (finally!) f) the Rich Text Format (RTF) is supported when pasting symbol characters to the Windows clipboard g) the dialog box for defining characters for the user-defined set has been simplified so you no longer have to remember arcane code numbers to access the characters you want h) the character set selection box is moved to Foreigner's system menu to reduce Foreigner's window size to the bare minimum i) Foreigner now "remembers" where it was on the screen when you last used it, and reappears there when executed the next time j) the arrow keys can now be used to navigate around Foreigner's main window, although I still contend that you probably will prefer to use a mouse k) general program operation is somewhat faster, although this is rather subjective depending on the type of CPU on which it's running Direct Paste Notes Progam Note PageMaker 4.0 Direct pasting only works if you don't have the "Minimize on press" option set. I have no idea why not but it's only a minor annoyance. Pasting from the clipboard with minimize option set does work OK. Word for Windows 1.1 Word changes the direct paste cursor (normally a crosshair) back to its normal I-beam when switching from Foreigner to Word if the mouse is not moved during the switch. This does not mean that direct paste has been unsuccessful. When you begin to move the mouse, the cursor will change back to a crosshair. Just click the left mouse button to proceed with the paste. So what's all this cost? Foreigner is freeware. This means that you can freely copy it, use it, and give copies to all your friends (as long you give them all of the unmodified files that you receivedFOREIGN.EXE, FOREIGN.WRI and README.TXT). However, this does NOT mean it is in the public domain; I retain the copyright. Do not change, edit, alter, or rename any of the files in any way (this means no fiddling with the executable program's resources either, guys!). Now for the legalese: THE SOFTWARE AUTHOR (L.G.GOLDSBOROUGH) DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, WITH RESPECT TO THE PRODUCT. SHOULD THE PROGRAM PROVE DEFECTIVE, THE USER ASSUMES THE RISK OF PAYING THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION AND ANY INCIDENTAL OR CONSEQUENTIAL DAMAGES. IN NO EVENT WILL THE AUTHOR BE LIABLE FOR ANY DAMAGES WHATSOEVER (INCLUDING WITHOUT LIMITATION DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS INTERRUPTION, LOSS OF BUSINESS INFORMATION AND THE LIKE) ARISING OUT OF THE USE OR THE INABILITY TO USE THIS PRODUCT EVEN IF THE AUTHOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. If you do encounter problems with Foreigner, or if you think of a way to improve it, or if you think of another Windows utility that you would find useful but cannot create yourself, feel free to contact me. Although I don't want cash for Foreigner, I am interested in hearing from people who use it. To this end, please send a postcard (with a picture of your town on front?) to: Gordon Goldsborough Brandon University Brandon, Manitoba, Canada R7A 6A9 (204) 727-9786 Fax: (204) 726-4573 Internet: GOLDSBOROUGH@BRANDONU.CA Bon chance! macro needed to bring up Foreigner fwsoka gw b^YUP$L0`?FhD0 $%v)4r:4n?4jT4fY4bn4^r4Z4V4R4N4Jh 44w4s4o4k4g4c5_5["5W*5S=5OE5Kh E5Y5wa5sw5o|5k5g5c5_5[5W5S5O5Kh 55w6s6o6k26g76cM6_R6[e6Wm6S6O6Kh 66w6s6oA8kX8fw=b=]5UYFUTB`PV`K6Kh V`X`wg`rbnbixcecad]gYiUB`PV`K6Kh LLLxce.=Rp@ .<Rp@ LLxce.=Rp@ .<Rp@ LLxce.<SRp@ .<Rp@ pLrLxce.<PRp@ .<Rp@  L L L L L L` LRp@ .<PRp@ ` a Lw Ly LLLsL` LRp@ .<Rp@ suLLLLLsL` LRp@ .=Rp@ LLLLL(L*LRp@ .<Rp@ *OLQLLL.< Rp@ .<@ Rp@ QLLLL.< Rp@ .<@ Rp@ LLL.<Rp@ .<@ Rp@ !L#LLL!L!LRp@ .<Rp@ !$L$$%!L.<Rp@ .<`Rp@ %%LI'LK'L)L)L*L*LRp@ .<Rp@ **L*L?+LA+L-,L/,L8-L:-LRp@ .<PRp@ :-/L/L*1L,1LA1LC1L8-L:-LRp@ .<Rp@ C1\1Lq1L1L1L1L1L1L 2L'2LA2L\2Lw2L.=Rp@ w22L2L2L2L2L3L33LN3Li3L3L3L3L.=Rp@ 33L3L3 42L.<Rp@ .=Rp@  4 4L%4:4T42L.=Rp@ .<Rp@ T4n4L4L4L4L4L4L 5L%5L@5L\5Lw5L5L.=Rp@ 55L5L5L5L6L26LM6Lh6L6L6L6L5L.=Rp@ 66L@8LA8LX8LZ8L9L9Lh6L6L6L6L5L.<Rp@ 9;L;LV=LX=Ls=L9L9Lh6L6L6L6L5L.<PRp@ s=u=Lw===s=L.=Rp@ .<Rp@ =>L>L>L>LALAL}BLBLBLBLtELvEL.<Rp@ vEFLFFFAL.<Rp@ .<uRp@ FqHLsHLHLHLLLLLLLLLNNLPNLNL@ .<Rp@ NNLNLOLOL%OL0OL;OLGOLOOLYOLeOL@ .=Rp@ eOgOLTLTL1UL%OL0OL;OLGOLOOLYOLeOL@ .<Rp@ 1U3UL5UFUHU%OL.<Rp@ .=Rp@ HUZUL\ULVV%OL.<SRp@ .<Rp@ VVLVLWLWLAXLCXLXLXLYLYLFZLHZL.<SRp@ HZ[L[L[L[LAXLCXLXLXLYLYLFZLHZL.<SRp@ [3\L\L\L]Li]L^L^L_L_L>`LFZLHZL.<`Rp@ >`@`LB`LV`X`i]L.<@ Rp@ .<Rp@ X`g`Li`LCaEai]L.<pRp@ .<Rp@ EabLbbbi]L.<Rp@ .<pRp@ bbLdLdLgLi]L.<Rp@ .<Rp@ ggLzh|h+ii]L.<Rp@ .=Rp@ +i-iLCiLXiL|iLiLiLiLiLiLRp@ .<Rp@ iiLiLiL|iLiLiLiLiLiLRp@ .<Rp@ f=/2!9(Rp@ [i\iLLsL` LRp@ .=Rp@   &276DO 5[ fp@ .<Rp@  HelvPSymbolLL.< Rp@ .<@ Rp@