TransPad 2.2
User's Manual

  1. Introduction

    With pairs of strings specified, TransPad lets you quickly copy or run one of them, and also lets you transform a text according to the pairs. Make text files called "mappers" in which pairs of strings are listed, and start to keep TransPad always running while you are computing, to do the followings.

    TransPad lets you switch to it's window by a hot-key, from your application (editor, wordprocessor, email composer, ...), search the mapper for a string by an autocomplete typing, and return to the application with the selected string copied into the clipboard just by pressing a key. Pressing other keys copies the string paired to the selected one or run/open the string if it is a file path.

    Therefore, TransPad is a solution to such problems you have faced in computing as: Tired of typing frequent strings (words, phrases, ...) ? Afraid of misspelling important strings (addresses, URLs, company names, ...) ? Want to define and use your own dictionary of vocabulary or terminology ? Sick of clicking to run or open a file?

    The other function TransPad can do with a mapper is to transform a text (a file or the clipboard content) according to it, replacing all the strings found in the text by the paired ones. This lets you do a kind of encryption or translation on a document or an email, which would be tedious tasks of search & replace without TransPad.

  2. Installation

    1. Upgrading

      If you have used a previous version, you don't have to uninstall it. Just install this version as described in the next sections, selecting OK in the box asking your confirmation of overwriting. If you have a license file, it will be effective also for this version.

    2. System Requirements

      • CPU: Intel 80486 or higher

      • OS: Windows 95, Windows NT 4.0 or higher

    3. Trial Version

      TransPad is distributed as a compressed file, *.zip, without a full license key. That is, the zip file is for the trial version. The installation process is simple. Just extract all of the files contained in it into a folder and run the installer(install.exe).

      In the second box in the installer, be sure not to choose the product folder but the parent folder! For example, choose "C:\Program Files" if you want TransPad to be installed in "C:\Program Files\TransPad". If you are a new user, the product folder does not exist and the installer will create it.

      A new user now has the trial license. That is, there are restrictions on some features, before you acquire and install a full license key.

    4. Full License Key

      Go to http://www.softbattery.net and acquire a key, a small file. The installation is simple. Just put it into the product folder.

  3. Search & Copy/Run

    1. Searching the Mapper

      Running TransPad right after installation, you can see that an example mapper is loaded. You will be informed of how to make and load a mapper in the next chapter. A mapper is a file in which pairs of strings are defined. We call the 1st and the 2nd string in a pair, alternatively the "Upper" and the "Lower" strings, since they are defined in 2 successive rows in the file. Let's denote the 1st string more simply by 1-string or U-string, and the 2nd string by 2-string or L-String.

      At the lower part of the main window, there are 2 edit boxes labeled "U" and "L", and one list box between them. The list box is listing all the U-strings (in alphabetical order, not in the appearance order in the mapper file) and the U edit box is showing the string selected in the list, as you may recognize by the same background color. The L edit box shows the L-string paired to the selected U-string. The keyboard focus goes to the list box, if you press the Down arrow key in the U box or the Up arrow key in the L box.

      Now, type into the U box any characters to see that the first matched string is selected in the list and the corresponding L-string is displayed in the L box. For example, type "pd". Then "pde" in the list is selected, and the paired string "partial differential equation" is shown in the L box. This example includes the latter string also as a U-string. Want to know the L-string paired to that? You don't have to type it or copy from the L box to U box. Just press Alt+A, then you can see what you want. "partial differential equation" will show in the U box and selected in the list, with the corresponding L-string shown in the L-Box. We call this command "chAin search" (Hence the A key is chosen for the command).

      You can run the command Alt+A also by pressing the "A" button. Similarly, the other buttons in the main window can be run also by Alt+(underlined key in the button name).

      Alt+U and Alt+L makes the focus go to the U and L boxes respectively. The H button "refresH"es the list. That is, it loads the mapper file, and fill in the list and edit boxes.

      Note that, the total number of pairs of strings to fill in the 3 controls with, are limitted in the trial version.

    2. Using the Strings

      Listing and searching the mapper as described in the previous section, TransPad can be used as your customized dictionary of vocabulary or terminology, or an address book, and so on. Any kind of pair will do. Abbreviation and full expression, one language and other, expression and explanation, and so on. You may use various kinds of pairs in one mapper, or may use in several mappers. Usually, it may be more convenient to use one mapper for this Search function, while you may prepare other mappers for Transformation function. In this example you see many L-strings begin with '#', to show the kind of pairs (addresses) different from that of other pairs (vocabulary). Of course, it's upto you whether you use other character, use another characters for other groups, or use none.

      Let's use TransPad with other applications. For example, now execute your text editor, word processor or email editor, which then deactivates the TransPad window. Press Ctrl+Alt+T, which is the hot key to activate TransPad, and can be changed by a menu. Type into the U box the least number of characters to match the string you want and/or navigate in the list box, to select the string. Press Alt+S, or Alt+R, to return to your application, which also copy the selected U-string or the L-string, respectiveley, for you to paste in your application. Therefore TransPad quicky gives you a string anytime you want it while computing with a minimal typing. Fill in your mapper with strings that you use frequently. We call the commands Alt+S and Alt+R "Copy & Minimize" commands, since the main window is minimized (shrinks) into the task bar in the desktop. To minimize the main window without copying, press ESC key. You can retore and activate the window any time by the hot key.

      You can swap the roles of U and L boxes, by a menu. Therefore we call the strings listed in the list box "s-strings" whether they are U-strings or L-strings, with "s" meaning "Search". Hence the S key is chosen for the Alt+S command. We also call the string paired to a s-string, "r-string", with "r" meaning "Replace" which is clear in the Transformation function. Hence the R key for the Alt+R command. Similary we can call each of the edit boxes, "S" or "R" box according to the role.

      The background colors of the s and r strings are customizable by menus. The r string can become invisible by a menu.

      So far you have been introduced to the copy-commands. We end this section by introducing the "run"-command. If the r-string is a file path you can run or open it by Alt+1 or double-clicking the corresponding s-string in the list box. In the example the s-strings "!notepad" and "!iexplorer" are paired to the paths of files notepad.exe and iexplorer.exe respectively so that the files will run if you use the command. If they don't run, paths must be wrong in your system and please modify them when you edit the mapper as described in the next chapter.

      The command not only run *.exe files but also open other files according to the file extension associations in your system. For example, if the r-string is a wave file(*.wav)'s path, the command will let your player (associated with the extension "wav") play it.

      To help you insert a long file path as a string into the mapper when you edit it, the S-Box accepts the file-dropping. It displays the file path if you drop a file into it so that you can copy the path by Alt+S to paste into the text editor for your mapper.

  4. More about Mappers

    In the main window, the controls on the 1st line are involved with the mapper. Mappers are recommended to have "n2n" extension, but they are just simple text-format files like *.txt that you can easily create or modify using your editor. The "Browse.." button lets you select a mapper, and the mapper's path and name appear in the "mapper display" window on the right. You can select a mapper also by the drop-file feature of the mapper display window. That is, you can drag a mapper file in a folder window outside TransPad and drop it in this window. These 2 methods of selecting a mapper also load it and fill in the list box, the U and L boxes, with the strings in it. The "Mapper.." button opens the mapper to view or edit it. The mapper editor can be specified by the "[Options]->[Mapper Editor...]" menu. Don't forget to press the H button after you edit the mapper, if you want the list box and edit boxes to be filled with the modified mapper.

    The mapper does not need to have the "n2n" extension and TransPad will work even if it has other extension. The "n2n" extension is suggested for you to associate it with TransPad in your computer (That is, you can run TransPad by double-clicking a mapper in a folder). If the installation was successful, n2n is associated with TransPad. Otherwise you should associate the extension yourself (Start to do it by pressing the right mouse button on one of mapper files in the TransPad folder and follow the dialog boxes provided by the OS. Refer to the OS manual).

    Now, press the "Mapper.." button to see how the example mapper example0.n2n is written.

           Example Mapper 0

       (Lines like this are ignored since they begin with a blank)

       Vocabulary

    pde
    partial differential equation

    partial differential equation
    diff. eq. which is ... ... ... ...
    ...

    As you may recognize by the example, a mapper has a very simple syntax as follows.

    1. Every blank-headed line is ignored by TransPad. Therefore you can insert any help strings or notes in a line, by starting the line with a blank. Let's call it a comment line.

    2. A "rule" is defined by a pair of successive lines, each of which starts with a character other than a white space (blank). "successive" means that there is no comment line between them. So, even if you don't need the second line (string), be sure to make it, by any one meaningless non-white-space character at least.

    3. A "string" in a line of a rule is defined to range, from the starting character, up to the last character other than white spaces. Therefore we have 2 strings in a rule and we call them the 1st and the 2nd strings respectively.

    There are some more basic things in TransPad mappers for you to know, which you don't need to know unless your editor is far from an ordinary text editor.

    • The white space characters are the 3 kinds of characters which are usually invisible in editors: blank, carrige-return, and next-line.
    • A line is defined to end by any number of successive characters of the 2 kinds: carriage-return, and next-line.

  5. Transformation

    In this chapter, you get introduced to what else TransPad can do with a mapper. The mapper file structure or syntax is the same, but in general you may rarely use one identical mapper both for Search & Copy/Run and for this function, since the usages are different. This chapter is about "String to String Transformation of a Text", and we begin with considering about when we need such a transformation.

    Are you bored of searching and replacing in your document editor ? You might be, if you have a set of many strings to change in some cases:

    • Before sending your document to a translator, you might want to change some secrete names, numbers, words or phrases into other strings. After you receive the translated document, you surely need to restore the strings.

    • There are many other cases where many strings need to be changed. If you are a translator, your work will be more comfortable if a set of simple strings in the documnet are changed by one click.

    • You might want to change your document, character by character, to protect it from other persons. It is a kind of encryption.

    A problem is not only spending a long time in brute force work (many searchings and replacings) on your editor, but also the process itself. Points of the process problem are described in the last item of TransPad features listed below.

    TransPad searches a document for a set of strings to replace, according to your mapping prescription called a mapper. Important features are:

    • As introduced in the previous chapter, a mapper is a file in which you list pairs of strings. When the 1st string of a pair is found in a document, TransPad replace it by the 2nd.

    • Your document can be a clipboard content, as well as a file. Therefore you can make TransPad work on your document editor.

    • Imagin a process, where you start from the head of the document to see if it contains one of the strings you want to change, move to the next part of the document, and so on. That is what TransPad does when you press a transformation button.

      Such a process is different from a process, in which you search the document for a string to replace, for other string to replace, and so on. The latter process is what you might do on your editor, without TransPad. In many cases the results of the two processes are the same. But there are also many cases in which a string search-and-replace influences the next string search-and-replace in the latter process, and the results of the two processes can be different from each other. In that case the result of the latter process can be totally far from what you expect. One of extreme cases is a character by character transformation.

    When TransPad runs right after installed, the controls for Transformation are disabled. Check the [Options]->[Enable Transform] menu, to enable them which are on the 2nd and 3rd lines in the main window. If you want to hide the content of the mapper in the list box and the edit boxes (U and L), check the [Options]->[Hide] menu.

    The controls on the 2nd line are involved with the 'target', that is, the document to transform. The "Browse.." button lets you select a target file, and the target file's path and name appear in the "target display window" on the right. The window has the drop-file feature. The "Clipboard" button is a push-like check button. If you check it by pressing it, the clipboard content is selected as the target, instead of a file, and "<Clipboard>" will appear in the target display window. If you uncheck it by pressing again, the last target file is selected again as the target. The button will be unchecked also if a target file is newly selected by the "Browse.." button or by dropping the file.

    The "Target.." button opens the target. If a file is the target, the button opens the file, by an application (editor or word-processor for example) with which you associated the file extension in your system. If the clipboard is the target, the button opens a dialog box displaying the clipboard text.

    (If you know what the clipboard is, skip to the next paragraph.) The clipboard is, a memory space provided by the operating system, which store data, for editors to be able to perform the copy and paste commands. That is, when you copy a string in your editor, the clipboard stores it for you to paste it into the editor or other editors.

    When you have prepared the mapper and the target, you are ready to use the 2 buttons on the 3rd line, that is, the "Forward" or the "Reverse" buttons, in order to transform the target. Now, let's start to learn what they do, using the example mappers and target in the folder where TransPad is installed.

    1. Example 1

      The first example takes example1.n2n as a mapper. Use the Browse button or the drop-file to select it. The target, sample.txt is already selected when installed.

      Press the "Target.." button to view the example document:

      I have never met Mr. Daniel Baker.
      I have met once Ms. Mary Smith.

      Press the "Mapper.." button to view the example mapper:

             Example Mapper 1

      Mr. Daniel Baker
      Mr. A

      Ms. Mary Smith
      Ms. S

      As you might expect, there are 2 mapping rules in this mapper. That is, if TransPad encounters "Mr. Daniel Baker" in the document TransPad will replaces it by "Mr. A", and if "Ms. Mary Smith" is encountered, it will be replaced by "Ms. S". Each of the lines in a rule should not start with a white space character. Otherwise the line is taken as a comment line which TransPad does not care, an example of which is the title "Example Mapper 1" in the 1st line. It's time to press the "Forward" button. After you do, you will see a comment on the transformation result on the status bar. Press the "Target.." button to view the transformed document:

      I have never met Mr. A.
      I have met once Ms. S.

      Press the "Reverse" button. Then you will obtain the original document. Of course TransPad refers to the same mapper during this reverse transformation, swapping the roles of the 2 strings in each rule.

      Note that, the document size in one transformation, and the total size of documents transformed during one run of TransPad are limitted in the trial version.

      You can use the clipboard as a document to transform, by checking the "Clipboard" button. Execute your document editor and load sample.txt (You can do it by the "Target.." button before checking the "Clipboard" button, or by other way). Now you are ready to test the function. In your editor, copy the content of it into the clipboard. Then, in TransPad, press the "Forward.." button. Now the clipboard content is transformed and you can see it by pasting into your editor or just pressing the "Target.." button to open a dialog box displaying the clipboard text. Test also the "Reverse.." button. Therefore, for example, you can use TransPad directly on your email browser, to transform a part of the email content before sending, or to view an email by the reverse transformation after receiving, without any need to insert the email body into a file for transformation.

    2. Example 2

      Let's turn to a character-by-character transformation example. Press the mapper "Browse.." button to select a mapper named "example2.n2n" prepared in the same folder. It starts as follows:

             Example Mapper 2

      A
      7

      B
      t

      C
      #
      ...

      As you already saw in the previous example what each line in a mapper means, you might expect what will happen after the forward transformation. Your document will change into a meaningless scramble of characters ! Let's use the same document used in Example 1 and press the "Forward" button. The result is:

      3 iW~l pl~lf ol8 Sf5 bWpslT tWqlf5
      3 iW~l ol8 mpVl Sj5 SWf` hos8i5

      You can ontain the original document by the "Reverse" button. This is a kind of encryption-decryption. For example you can share the same mapper with a friend, in order to send and receive documents including emails securely. If you decide to use TransPad to encrypt your document, you might want to make a new mapper. You can make it by modifying this mapper(example2.n2n) or a "identity" mapper (identity.n2n) in the same folder. Take any arbitrary couple of rules and swap the second lines (or the first lines), take other couple to swap, and so on.

    3. Mappers and Targets

      This section describes in detail how Transformation works.

      If you press one of the transformation buttons, the mapper file will be loaded before the transformation (You don't have to press the H button).

      When TransPad transforms a document in the "forward" direction, it searches for the 1st string of the pair and replaces it by the 2nd. Let's call the two string, "s-string" and "r-string" respectively according to their roles. In the "reverse" direction, the roles of the strings are swapped.

      There can be rules (pairs) more than one in a mapper. You might want to ask about the priorities of them. When you start a transformation, TransPad begins with the head of the document to see if the s-sring of the first rule is found in the head. If not, it tries the second rule and so on. If the s-string of a rule is found, it will be replaced by the r-string without trying the other rules and TransPad will move to the next part of the document. If none of the s-strings is found in the head, TransPad will move to the next bytes of the document. This is the first step of the transformation, and the other steps are the same. That is, in each step TransPad tries the rules according to the appearance order (in the file, not in the list box), starting from the first rule.

      Targets are document files or clipboard content to transform. TransPad searches a target for strings of bytes, and replaces them by strings of bytes. The strings are simply of text-format, as specified in the mapper file. Therefore TransPad will transform successfully your usual text-format documents. However if your documents are of other formats specific to word-processors or authoring tools so that the formats do not have text-format parts, you might not be satisfied by the transformed document.

      The longer transformation time is needed for the bigger target, of course. Note that the main window does not react to any user input including mouse-clicks during the transformation time. But you don't have to worry. Just wait or do works with other programs, until the message "Transforming..." on the status bar will be replaced by result messages.

      If you carefully read the paragraphs above, you can recognize that the transformation is not always reversible, depending on the mapper and the document. The reversibility means that, you can obtain the original document, if you transform once more, in the opposite direction. Furthermore, in some cases transforming more than once by mistake in the same direction can make the process irreversible. Even if it is reversible in those cases, the document can be recovered after many attemps unless you remember how many times you pressed the transformation button by mistake. Therefore you are recommended to view the document before the transformation, especially when a mapper for encryption (character by character mapping) is used.

      In general, you are recommended to make a copy of your document file before transformation, in view of dangers described above.

  6. Options Menu

    You can adjust the size of the main window, to change the widths of controls for showing file paths or strings, and the status bar, and to change the height of the list box. The items in the [Options] menu are decribed in the following sections. The options specified by the menu, the Clipboard button state as well as the main window size and position, will be automatically saved in a file named "conf" when you exit, to be applied in the next run.

    1. Hot Key...

      This menu item opens the following dialog box in which you specify the hot key to activate the main window while you work on other program.

      The default hot key is Ctrl+Alt+T, and is displayed in the small window at the top. To modify it, click the window to set the focus on it, and press the hot key you want. Press ESC or Spacebar to delete the hot key.

      The "OK" and "Cancel" buttons terminate this dialog box. The former confirms the modifications, but the latter cancels.

    2. Enable Transform

      Check this menu to enable the controls for Transformation, which are the controls on the 2nd line in the main window for the target to transform, and the 2 transformation buttons on the 3rd line.

    3. Mapper Editor...

      This menu item opens the following dialog box in which you specify the mapper editor. The mapper editor is an application which is executed when you press the "Mapper.." button in the main window to view or edit the mapper.

      You can specify the application (editor, viewer, or word-processor) by editing the "Application:" window or by using the "Browse.." button. The "Command Line:" window is used to specify the command line string for the application, in which the only syntax you need to know is just "%m", the substitute for the mapper filename including it's path. Of course any string more than "%m" can be contained in the window, depending on your application's command line format. When you want to include a "%" in the string, you should use "%%" instead.

      The "OK" and "Cancel" buttons terminate this dialog box. The former confirms the modifications, but the latter cancels.

    4. Color S...

      This menu item opens the color selection dialog box in which you specify the background color of the controls for s-strings (The list box and one of the U or L boxes).

    5. Hide R

      Check this menu to hide r-strings (in one of the U, L boxes). The background color of the "r box" will become dark.

    6. Color R...

      This menu item opens the color selection dialog box in which you specify the background color of the control for r-strings, i.e. one of the U or L boxes.

    7. Hide

      Check this menu to hide all the strings. The list box, and the U and L boxes become empty.

    8. Swap

      Check this menu to swap the roles of the U and R boxes. That is, the list box will lists the L-strings, the L box will be used to search and select, as will be intuitively recognized by the swapped colors of the boxes and by the swapped locations of the S and R buttons.

    9. Exit

      This menu item terminates the program.

  7. Help Menu

    1. Content...

      This menu item opens this manual.

    2. About...

      This menu item opens a dialog box, in which the version, the copyright and the license status are informed.

  8. Limits of Trial Version

    Here are the list of limits you experience unless you acquire a full license key.

    If the number of rules(pairs) in the mapper exceeds 20, the trial version does not fill in the list box and the 2 edit boxes, and makes them empty, although the mapper will be loaded to be ready for Transformation.

    The trial version checks the following conditions before the start of a transformation, and cancels it showing a message box if one of them is found.

    1. The target is a file. It's size, or the total size of files transformed so far since TransPad started, is greater than 600 bytes.

    2. The target is the clipboard content. It's size, or the total size of clipboard contents transformed so far since TransPad started, is greater than 300 bytes.

    The trial version also has a small additional area in the main window to display advertising pictures, so that the main window may be a little larger than the one with the full license key. If the computer is connected to the internet, new pictures may be displayed.

  9. License Agreement

    Please read Agree.txt.

  10. History

    • Version 2.2: Apr 21, 2011

      The installer and the uninstaller are included.

      Two pairs of strings in example0.n2n are replaced, because they are about file names in TransPad folder which are now incorrect relative paths from TransPad shortcuts created by the installer.

      The check-control in the Mapper Editor menu's box is removed. The option is not useful since mappers(*.n2n) are associated with TransPad by the installer now.

      The fonts are changed.

      A bug in loading a file by association (for example when double clicking it) is removed.

      The product is modularized, the result of which, the new file softbatt.dll gets installed into the system folder.

    • Version 2.1: Nov 25, 2010

      A bug in the transformation function is removed.

    • Version 2.0: Aug 19, 2008

      Search & Run Strings function is added: If the r-string is a file path it can be run or open (according to file-extension) by Alt+1 or double-clicking in the list window.

      s-Window can accept a file-dropping to show the file path, to help insert a file path as a string when editing the mapper.

      A bug is removed which made the target path window unable to accept a file-dropping.

      The configuration file (named "conf") for the previous version (1.8), will also work for this version.

      The full license key for the previous versions, will work also for this version.

    • Version 1.8: Oct 9, 2007

      Search & Copy Strings function is added. Therefore the "mapper" concept helps users in typing and viewing frequent strings or pairs, as well as in transforming a document.

      The user interface for the transformation is not changed, except that the controls are disabled unless the Enable Transformation menu is checked.

      The ESC key is now used to minimize the window, not to terminate the program.

      The configuration file (named "conf") for the previous versions, will not work for this version.

      The full license key for the previous versions, will work also for this version.

    • Version 1.2: Mar 27, 2007

      The "Target.." button now remains active to open a dialog box displaying the clipboard text, when the clipboard is selected as the target.

      The "Clipboard" button is not a simple push button any more but a check button (although looking like a push button). Just uncheck this push-like check button, to select again the last target file as the target.

    • Version 1.1: Jan 8, 2007

      The advertisement method in the trial version is changed into a more user-friendly way: The nag screen (a HTML document) is removed and a small area is added to the main window instead.

      A small problem is removed which has happend on closing the main window.

    • Version 1.0: Nov, 2006