Unit Scout is a unit converter and calculator which does not depend on a user interface as it can be controlled from almost every text field of every program within your operating system. It scans keyboard input when typing text into arbitrary text fields, checks for unit conversion commands and if successful executes the unit conversion behind the scenes and sends the results to the active text field. Unit Scout is customizable with user defined units. For the time being it is only available for MS Windows.
If Unit Scout is active, every string the user enters into an arbitrary text field is analyzed. In case of the occurence of ">>" or "<<" (referred to as right and left chevron, respectively) within a string, Unit Scout parses and processes the string further. A string can be corrected by backspaces but is ended by a space. In other words the space key triggers the analysis of the recorded string in Unit Scout. If a unit conversion command is detected, it is converted and the result is passed back to the text field replacing the command. Afterwards the previously recorded string is replaced by the result. Recorded strings are purged from memory without further processing if mouse buttons are pressed or if one of the following keys or key combinations are pressed: ENTER, LEFT/RIGHT/UP/DOWN ARROWS, PAGE UP/DOWN, ESCAPE, HOME, END, START MENU, CAPS LOCK, TAB, CTRL+Y, CTRL+Z, ALT+TAB, SHIFT+HOME/END/LEFT/RIGHT/UP/DOWN etc. If the hotkey CTRL+V is detected, the textual content of the clipboard is appended to the so far recorded string. Up to now only the ANSI character set is supported. It is planned to provide Unicode support in future releases.
Do not use right or left chevron (">>" or "<<") as substrings within passwords if Unit Scout is used. There is the danger that passwords are spoiled unnoticeably.
Unit Scout can be controlled over a tray icon menu and corresponding keywords listed next.
help>> | Show help file. |
about>> | Show release information. |
database>> | Show unit database table. |
idle>> | Program is idle until next "idle>>" keyword is typed. |
urllookup>> | Toggle for activating/deactivating the internet query of currency conversion rates. |
compact>> | Toggle between compact and lenghthy notation of results (e.g., m2/s versus m^2*s^-1). |
unitset>>xxx | Activate unit set with name xxx. After activation units will be converted to units of this unit set per default. Unit sets are customizable by changing the unit database file. |
log>> | Open log file. |
journal>> | Open journal. |
units>> | Open customizable unit file. Before opening the file, automatic translation to regional dialect can be triggered through user's permission. |
prefixes>> | Open customizable prefix file. Before opening the file, automatic translation to regional dialect can be triggered through user's permission. |
config>> | Open configuration file. |
restart>> | Restart program. |
exit>> | Exit program. |
The following keywords have no corresponding menu item.
last>> | Send last conversion command to current textbox. |
The left chevron ("<<") at the beginning or right chevron (">>") at the end of an expression indicates that the unit expression shall be converted into its SI unit (unless a keyword is detected). If the left/right chevron is somewhere in between two sub expressions, Unit Scout tries to convert from the unit expression towards the unit expression to which the chevron arrows point. Of course, this can only be successful if the source and destination units are compatible. The command "ft>>" will result in "0.305m" whereas "ft>>in" will give you "12.0078740157in". The command "m>>s" will raise a sound indicating that the operation failed.
Unit Scout lets you not only convert units but really calculate with them. Suppose, you want to design a pump and want to know the pump's head in ft (pressure in terms of hydrostatic height). Let the pressure drop and density be given by 10 bar and 450 kg/m^3, respectively. Now simply type "10*bar/(9.81*m/s^2)/(450*kg/m^3)>>ft" anywhere you want (text editor / spreadsheet / web browser / etc.). The result you will get is "742.708919377ft". The result is stored in memory and can continuously be calculated with. After the result was sent, it can be further converted into "m" by extending the expression by ">>m". Another option is to make use of the keyword "last>>" which brings up the last command.
Calculation operators include "+", "-", "*", "/", "^" or "**". For successful addition and subtraction, the involved units must be compatible. Exponents of units should generally be numerical or fractional expressions. The calculation syntax was simplified for user's convenience. The operator in between number and unit can be left out. The operator will be added such that number and unit are on the same side of the fraction bar. E.g., "1/2m^3"is interpreted as "1/2/m^3" while "2m^3" is interpreted as "2*m^3". If the exponent is positive, the power sign "^" or "**" is optional. E.g., you may write "m3" as a short notation for "m^3". A comma (",") will be interpreted as decimal mark. If a comma is used, the output will also be comma based.
Every unit can be combined with a prefix. In order to distinguish "m" (milli) from "M" (mega), commands are generally interpreted case sensitive. The micro (10^-9) prefix can either be stated as "u" or as "µ". Prefixes and units can either be stated as symbols or as names. Valid combinations are prefix and unit symbols as well as prefix and unit names. The expressions "ms>>" and "millisecond>>" succeed whereas "msecond>>" and "millis>>" fail. Prefix and unit names are supposed to be unique and are therefore interpreted case insensitive. It is recommended to use symbolic expressions as these are generally unique. The user should keep in mind that symbolic interpretation is always made first. Only if it fails, parsing based on names will be attempted. Results will always be symbolically expressed.
Unit Scout takes the offset of biased units such as °C or barg into account. But this holds only if the unit is multiplied by a factor or prefix and not by another unit. For instance, "1k°C>>" yields "1273.15K" as there is an offset of 273.15K. However, "1/°C>>" yields "1.0K^-1" or "°C/m>>" yields "1.0m^-1*K" in which the offset is disregarded.
The data basis for the unit conversion is represented by the files ".\data\prefixes.csv" and ".\data\units.csv" if the portable application is used and by the files "%appdata%\unitscout\data\prefixes.csv" and "%appdata%\unitscout\data\units.csv" if the installed application is used. These files can be user customized. The files are encoded in ANSI and use the MS Excel CSV dialect. Supported delimiters are comma, tabulator, semicolon, space and colon. For user convenience an Excel Macro-Enabled Workbook (*.xlsm) file is shipped from which a CSV file can be created.
The prefix file consists of a table with header of at least five and at most seven columns. The first and second column represent the prefixes' symbols and alternative symbols, respectively. E.g., the "micro" prefix is represented by either "u" or "µ". The third column states the prefixes' names. The entries in the first, second and third column should be unique. The fourth and fifth column contains the prefixes' bases and exponents from which the prefixes' factors can be calculated. Both basis and exponent must be integer. The sixth and seventh column are for user information only and have no effect on the behavior of the application.
The unit file consists of an eleven-column table with header. The first and second column represent the unit symbols and names. The entries should be strictly unique. A cell can be left blank if a unit has either no symbol or no name. Names must not contain spaces and should be lower case. Otherwise, it will be corrected during program start-up. Symbols and names may consist of numerals but must not begin or end with numerals in order to avoid misinterpretation as multipliers and exponents. The third column indicates the type of the unit. This enables unit classification for tabular representation. Columns four and five represent unit sets and relating prefixes, respectively. The entries of both cells may contain comma separated values. For instance the entries "MKS, CGS" in column four and "k, " in column five for unit "gram" can be interpreted as follows. "gram" is the basis of the unit sets MKS (millimeter-kilogram-second) and CGS (centimeter-gram-second). The result of the conversion of "pounds" to the MKS and CGS set would result in "kg" and "g", respectively. Column six and seven define the factor and unit of the gradient of the conversion while column eight and nine define those of the offset of the conversion. More precisely, column six gives the conversion factor towards the unit given in column seven and column eight gives the offset in terms of the unit in column nine. An empty cell in the sixth column corresponds to a one. An empty cell in the eighth column corresponds to a zero if also the cell in column nine is empty; otherwise it is interpreted as a one. You may use the dot "." and the comma "," as the decimal mark for numerical values. The unit expressions in columns seven and nine must not necessarily be SI units but they must depend recursively on SI units. An advanced example is that of norm cubic meter "Ncm" defining the amount of particles in one cubic meter of ideal gas at standard conditions (1 atm and 0 °C). It can be expressed as "1.0*m^3*atm/(0.0*°C>>K)/_kB/_NA". Here, "_k" and "_NA" refer to Boltzmann and Avogadro constant, respectively. Note that there is no strict convention that constants begin with an underscore ("_") but the developer recommends it to avoid mixing them up with units. Column ten contains URLs where the application can pull conversion factors. This is particularly useful for currency conversions which are constantly changing. Supported websites for pulling conversion factors are rate-exchange.appspot.com/ and www.google.com/ig/calculator. Please note that these URLs must be appended with a conversion command in order to trigger a unit conversion request. Working examples are present in the defaults unit database file. Column eleven contains unit descriptions and will be used for displaying tooltips in the application's unit database table.
Unit Scout has a build-in key logger. However, there exists a possibility to interface an AutoHotkey based key logger. This is due to historical reasons (the build-in key logger was buggy for non-US keyboard layouts which make use of dead keys). AutoHotkey can be favorable in case the user wants to customize the behavior of Unit Scout (for instance removing the tray icon/menu). For this purpose, feel free to modify the file ".\lib\tracker.ahk". For the use of AutoHotkey the configuration file ".\data\config.ini" must be adjusted. If AutoHotkey is requested but not installed, it will be installed during program start-up.
Both the build-in and the AutoHotkey key logger do only support (Latin) characters of the ANSI character set. Special attention must be given to diacritics. The diacritical mark is always logged separately from the letter. This means that if you type "â", "^a" will be logged. This does not pose a problem as long as your units do not consist of diacritic letters.