1-217-214-0169

Search our Site

AHK Logo HorizAutoHotkey gives you the freedom to automate any desktop task. It's small, fast and runs out-of-the-box.

Introduction

For over 10 years now, I've enhanced the use of my desktop PC and laptop with a tool called AutoHotkey or AHK for short. AutoHotkey is a free, open-source, scripting language for Windows OS that allows you to easily create simple-to-complex scripts for all kinds of tasks such as: form fillers, auto-clicking, macros, etc. AutoHotkey gives you the freedom to automate any desktop task. It's small, fast and runs out-of-the-box. Best of all, you can create your own little scripts to help with your Gene Grawe Fund activities.

You can also add scripts for your non-GGF computer needs, like names, email addresses, home addresses, phone numbers, your personal credit/debit card info, salutations, spelling corrections, phrase abbreviation, entire paragraphs of boilerplate text, and many others. Actually, the list is endless. One of my favorites is when I type i@ and Info@GeneGraweFund​.​org suddenly appears. No ending keypress needed. By the way, the hotstring scripting code for that is:

:*:i@::Info@GeneGraweFund​.​org

AHK is a very powerful scripting program that can do a lot more than that, but for my Gene Grawe Fund needs I mostly use hotstrings. A hotstring is a bit like the Autocorrect feature on your smartphone, but not the same. I've have all kinds of little hotstrings that help me reduce the amount of typing I need to do as part of my family's Gene Grawe Fund program. I also use a few hotkeys I created for slightly more complex automation, which I talk about later in this article.

 

Setting Up AutoHotkey on Your Windows Computer

To setup AutoHotkey on your Windows computer you'll first need to download the most current version from AutoHotkey.com and then follow the installation and setup instructions in the AutoHotkey Beginner Tutorial in the online documentation.

During setup you'll create an AutoHotkey script file. I keep mine in my Documents directory so that it gets backed up regularly. It is simply a text file you'll routinely edit with a text editor like NotePad. Unless you know what your doing, do not use a word processor like Microsoft Word as it will add in all sorts of non-text, formatting characters that will break your AHK scripts.

Create a desktop shortcut for this file as you'll run it frequently.

 

Install a Script Editor for AHK

You can simply use Windows Notepad text editor to edit your script file or you can install a script editor designed specifically for editing and debugging AutoHotkey script files. The one I use is a Scintilla based Text Editor called SciTE4AutoHotkey and it has many useful features that make it much better than NotePad.exe for editing AHK script files. My favorite is that it displays the text in various colors to differentiate command syntax from text making the scripts much easier to read. Click here to download it. It's Quick Reference Guide can be found here.

 

Run Your AHK Script File

Anytime you edit your AHK script file, you'll need to save it and then reload it into the computer's memory. This is commonly known as run the script. Other terms are execute, fire off, pop off, load, and reload the script. There are several ways to start the process of loading or reloading the script file into memory, but by far the easiest, is to simply double-click on the file's icon or shortcut on the computer desktop. If you don't get an error message, then it reloaded fine, meaning the scripting code in your file was syntactically correct. But that doesn't mean your newly added hotstring is perfect and will do what you expect when you test it.

 

Run Your AHK Script File Automatically During Startup

You don't want to have to remember to run your script file every time you startup your Windows computer. Fortunately, it is very easy to add your script file to the Windows startup process thereby making its hotstrings and hotkeys available to you at all times. The 3-step instructions to do that is on the AutoHotkey website.

 

Hotstrings

First, to define a very simple hotstring in your AutoHotkey script file, you enclose the triggering abbreviation between pairs of colons and then you add the hotstring text after the last pair of colons like this:

::btw::by the way

Then when the trigger abbreviation btw is typed and followed by an ending keypress such as Space, Tab, or Enter, the trigger text instantly disappears and is replaced with the hotstring text by the way. Hotstrings can get much more complicated than this simple example. For instance, you can have your hotstring send keystrokes to the screen to automatically move the cursor focus from field to field entering text as it goes along. Or you can execute an action such as sending an Enter keystroke to kickoff some process. But, even using its most simple forms, we can still accomplish many timesaving automations like the debit card info hotstrings below.

Visa Debit Card Info Hotstrings

Every month, my family and I use a lot of GGF prepaid Visa debit cards for bill payment and shopping–both online and local. One of the most helpful sets of hotstrings I make every month is for the Gene Grawe Fund Visa debit card information. I make one set for every new debit card we purchase. It only takes a minute or so to create each set.

I got really tired of the monotony and inaccuracy of retyping a card's 16-digit account number dozens of times during the life of the card. And then there are those aggravating times when I mistype a number and the online transaction won't go through leaving me to scratch my head trying to figure out what went wrong since the card info is not displayed on the transaction's error screen.

The following hotstrings in the blue code box below solved all that by automating the entry of a debit card number, expiration date, and security code in various forms under different circumstances. You only have to get the numbers right once and that's when you create the hotstring. After that, when the trigger abbreviation is typed out, the hotstring's correct debit card info is sent to the screen.

I normally use the debit card's last four numbers as my trigger. So if you type the last four numbers of real debit card number 0346 and then press the Spacebar, Tab, or Enter key, the debit card's 16-digit number 4912775474140346 is sent to the screen. Works most of the time when I need to enter the debit card number during checkout on a website. However, I have run into a few websites where it gets messed up. In those rare cases, I just have to type it manually.

; To embed a comment in your code, start the line with a semi-colon.
;::trigger::hotstring

;  Actual hotstring scripting code for a real, zero-balance, Visa debit card that you could use to test on FiveBackGift​.​com.

::0346::4912775474140346
::-0346::4912-7754-7414-0346
::x0346::4912-7754-7414-0346 03-27 642
::f0346::4912775474140346{Tab}03{Tab}27{Tab}642{Tab}{Tab}{Tab}{Enter}

If you need dashes in your card number, type the trigger -0346 to get 4912-7754-7414-0346.

Type the trigger x0346 to get 4912-7754-7414-0346 03-27 642 which is the card number, expiration date, and security code. I use this hotstring in a Quicken transaction's memo field so I have a record of what card I used to pay for a bill or purchase. I also use it as part of the filename when saving an online receipt as a PDF document to my computer. Avoid using slash "/" to separate the mm/yy in your hotstring as a / cannot be used in a filename.

If you add some simple keystroke commands you can make a hotstring do even more work for you. For instance, I created hotstring f0346 for use on FiveBackGift​.​com whenever I need to access the record for my debit card ending in 0346. I chose to use the letter "f" to be the prefix of my trigger because FiveBackGift begins with an f. So I type the trigger f0346 in the Card Number box and hit Enter. Immediately, all the fields are filled in and the automatic Tab and Enter keystrokes take me right to the Verify challenge screen where the hotstring stops.

Below is the boilerplate hotstring code which you can copy into your AHK script file.

; Here is the GGF debit card boilerplate hotstring text that I store in my AutoHotKey script file. When I need to create some debit card hotstrings, I copy the following four lines of code, remove the leading comment semi-colon from each line, and then add my debit card info. The mm and yy are placeholders for the card's expiration month and year and the nnn I replace with the card's security code. The card number's first six digits 491277 designate the card's issuing bank and never changes. Storing the boilerplate hotstrings without the comment semi-colon at the begining of each line will cause your AHK script file to fail when you attempt to run it.
;::::491277
;::-::4912-77--
;::x::4912-77-- mm-yy nnn
;::f::491277{Tab}mm{Tab}yy{Tab}nnn{Tab}{Tab}{Tab}{Enter}



Hotkeys

One of the ways a hotkey is different from a hotstring is how it is triggered. A simple hotstring is triggered by a text abbreviation, whereas a hotkey is triggered by a command keypress combination using either the Ctrl, Alt, or Shift keys, plus another key. This allows a hotkey to be fired off even when the screen cursor is not in a text entry field.

 

Visa Card Registration Hotkey

Because of the need for online transactions in today's world, I register every Gene Grawe Fund Visa debit card that I purchase. That way I don't have to wonder if the card I want to use has been registered or not. This hotkey makes the task reliably accurate as opposed to me typing the info each time. The accuracy is what's most important here because the personal info you enter becomes the billing information for that debit card and for fraud protection reasons, once entered, cannot be corrected later or even looked at. You must get it right the FIRST time and this hotkey will ensure its right EVERY time after that. In most cases, the info would be the same as the billing information on all your regular (non-GGF) debit and credit cards.

The hotkey in the blue code box below automates the task of registering a Gene Grawe Fund Visa debit card at FiveBackGift​.​com. You can copy the contents of the blue code box into your AHK script file, then edit the trigger and personal information.

;  Register your Gene Grawe Fund Visa at FiveBackGift​.​com
;  [If desired, change the hotkey trigger to an unused set of trigger keys.]
;  [Edit your personal information using a 2 character state code, a 5-digit Zipcode, and a 10-digit phone number without dashes. If you don't use a 2 line street address, then delete the placeholder from between the two {Tab}s for StreetAddress2 leaving just {Tab}{Tab}.]

;  1. To use go to FiveBackGift​.​com.
;  2. On the Registration Card tab place your cursor in the Card Number field and use your card's fnnnn hotstring to access the card's account.
;  3. On the Register your Five Back Visa Gift Card screen, place your cursor in the Email field, then hold down the Shift key while pressing function key F3.

;  Scripting Code

SHIFT & F3::Send me@emailaddress​.​com{Tab}FirstName{Tab}LastName{Tab}StreetAddress1{Tab}DeleteThisPlaceholderIfNoStreetAddress2{Tab}City{Tab}ST{Tab}Zip{Tab}10-digitPhoneNumber{Tab}{Tab}{Enter}

 

Visa Card PIN Update Hotkey

If you use your Gene Grawe Fund Visa prepaid debit cards at gas pumps and other places where you're required to enter the card's PIN, you may want to change the PIN to something other that the default PIN which is the last four digits of the card's account number.

The hotkey in the blue code box below automates the task of updating a Gene Grawe Fund Visa debit card's default 4-digit PIN at FiveBackGift​.​com. You can copy the contents of the blue code box into your AHK script file, then edit the trigger and personal information.

;  Change your Visa card's default 4-digit PIN to a 4-digit PIN of your choosing.
;  [If desired, change the hotkey trigger to an unused set of trigger keys.]
;  [Replace nnnn with your favorite 4-digit PIN.]

;  1. To use go to FiveBackGift​.​com.
;  2. On the Personalize PIN tab place your cursor in the Card Number field and use your card's fnnnn hotstring to access the card's record.
;  3. On the Update Card PIN screen place your cursor in the left 4-digit PIN field, then hold down the Shift key while pressing function key F5.

;  Scripting Code

SHIFT & F5::Send nnnn{tab}nnnn{ENTER}

 

Hotkey to Add a New GGF Visa to Comcast

The Comcast website is one of those great places where you can wipeout a handful of leftover Visas with small balances on them when paying your monthly bill. A Visa with a $3.51 available balance is not useful online in very many places.

The hotkey in the blue code box below automates part of the task of adding a new Gene Grawe Fund Visa debit card to your Comcast account. You can copy the contents of the blue code box into your AHK script file, then edit the trigger and personal information.

;  Adds a new GGF Visa card to your Comcast account.
;  [If desired, change the hotkey trigger to an unused set of trigger keys.]
;  [Edit your names below matching the names used when you registered your GGF Visa.]
;  [Replace mm with the card's expiration month & yyyy with its expiration year.]
;  [After the hotkey ends you'll need finish the account number and add the security code.]

;  1. Login to your Comcast Xfinity account and go to make a payment.
;  2. Work your way to the New credit/debit card page.
;  3. Place your cursor in the First Name field, then hold down the Shift key while pressing function key F6.
;  4. After the hotkey ends you'll need finish the account number and add the security code.
;  FYI: The SetKeyDelay, 150 command slows down the keystroke sending speed to one keystroke every 150 milliseconds.
;         The {Shift Down}+{Tab 4}+{Shift Up} key combination reverses the normal tab direction for 4 Tab keypresses.

;  Scripting Code

SHIFT & F6::
SetKeyDelay, 150
Send FirstName{tab}LastName{tab}{tab}mm{tab}yyyy{tab 2}
Send {Shift Down}+{Tab 4}+{Shift Up}
Send 491277
Send {End}
Return

 

I hope the above hotstring and hotkey examples help reduce some of the repetitious typing you have to do managing your family's Gene Grawe Fund program. If you create any helpful scripts, please email it to the Gene Grawe Fund and we'll include it in this article and credit you.