Specialized Calculator

with AutoHotkey

by Denis Lamarre
last updated Feb 21, 2014
difficulty.png Complex

by Denis Lamarre

Description

Many jobs require a calculator and many professionals, who work with numbers, keep one next to their computer. Calculations are often monotonous and have to be performed over and over. They may include calculating the same ratios, commissions or taxes as a matter of routine. The results must then be typed into a computer.  Assuming all calculations are good on the calculator, once they are transferred to the PC, a slipped keystroke can make them all irrelevant.

In this Specialized Calculator example, we will show you how to calculate two taxes from a specific amount, then get each of the results (including the amount, the two tax levels on this amount and the total after taxes) so they can be pasted (without error) with Enterpad buttons where they are needed.

Regardless of what type of calculations you have to do, be they for taxes, mortgage rates or tips, you can easily adapt this Specialized Calculator for your specific needs.

Steps

Note: You can trigger the following script with your standard keyboard if you don't have an Enterpad. If so, just replace the lines 1 on step 2 and 3 with your hotkey definition. The Enterpad hotkeys are useful for efficiency driven professionals who want to avoid the trouble of dealing with too many Windows hotkeys [learn more].

1

CalculatorPrepare your overlay.
Find 5 keys on the Enterpad that are close to each other.

- The first will start/show the calculator.
- The second will type the amount without taxes.
- The third will type the first tax amount.
- The fourth will type the second tax amount.
- The last will type the total amount with taxes.

2

Code installation.
Copy/paste the following code in your AutoHotkey script template (Enterpad.ahk) for the key you selected for 'Start Calc' (to start/show the calculator).

3

Code installation.
Use the following code for each number you want to retrieve from the app, and replace the name between the percent signs.

003:
SendInput %FirstTax%{Enter}
return

More Info

With few modifications, this small application can handle any kind of calculation easily. The GUI lines of code creates the buttons, titles and text boxes that are used by the application to show data. Look at this AutoHotkey documentation to learn more about creating visual controls with AHK.

While the window is shown, pressing the ESC Key once will clear out all the numbers, and pressing it twice will close the window.