Windows autocorrect- Adding hotstrings in AutoHotKey
For about 20 years I loved using autocorrect feature in Word and Excel to help me write commonly used phrases. Unfortunately, at that time, MS office didn’t sync across programs so I had to maintain my list of corrections in each program. Worse yet; I also had to repeat it on every computer that I used.
About a decade ago I read an article which mentioned AutoHotKey had built in “Hotstrings” which provided a similar functionality but would work in any windows program. (AutoHotKey has a ton of other great features but this is the one that has the largest appeal to the most users.)
I think of hotstrings and a windows autocorrect. Used intelligently you can tell the computer when I type a few letters, replace the abbreviation I just typed with a full sentence, paragraph, etc. It is fairly easy to add Hotstrings in AutoHotKey however there is a script which speeds-up the process. The below video walks through the process.
HotStrings with AutoHotkey are a Text Expander that:
- Quickly get you to be more efficient
- Reduce likelihood of Carpal Tunnel
- Improve Accuracy/Reliability you use correct content
While HotStrings are very easy to add and use, I take a little different approach when the text I’m inserting is long (over a couple of lines). Using the Join command for long text can greatly help readability of your code as well as do some fun manipulation. Here is the code I work through in the below video
;~ https://autohotkey.com/docs/Scripts.htm#continuation ;scroll down after loading page
`s Space `r`n=CR+LF |=pipe
LTrim: Omits spaces and tabs at the beginning of each line
% (percent sign): Treats percent signs as literal rather than as variable reference
Comments Allows semicolon comments
, (comma): Treats commas as delimiters rather than as literal commas.
( Join`r Comment Ltrim
---- this is what I need to do to show on the totals -----
select distinct cm.EMAIL_ADDRESS Email,cm.UPLOADING_COUNTRY
from ods.em_camp_global_contact_master cm ;another comment
inner join ods_email.sp_engage_all_eventtype_master aa on (cm.EMAIL_ADDRESS=aa.EMAIL_address) ;join on email address
WHERE aa.event_timestamp > CURRENT_DATE - INTERVAL '1' MONTH --Date '2015-06-01'
And this Text Expander with AutoHotkey for HotStrings with Long Replacement Text
Using Hotstrings from AutoHotKey help write your code is a great, easy, way to greatly improve your speed! This example demonstrates me using hotstrings for writing most of which are actually custom SPSS scripts) which typically affect the look of output. The newer versions of AutoHotKey now utilized Python for their scripting. Most of mine were written in SAX Basic. I’d post the code but it is unlikely they will work for you.
Scripts are easy to use and adaptable to make output much more meaningful and in a format ready to be used. AutoHotKey helps write syntax to utilize the scripts.
Free SPSS Scripts
Use this script to rename some or all of the variables in your spss dataset. This script uses search and replace for effective renaming. Rename all your variables …
I believe HotStrings are one of the simplest & most productive tools you can use! In this AutoHotkey HotString tutorial Jackie Sztuk from JZApp.com and I walk through many uses and how easy they are to create, maintain, and use. There are some great tutorials on the AutoHotkey site as well as a small script that makes adding new HotStrings a breeze.
If you’d like to have a “spell check” running in every windows program, you can use this Autocorrect script.
Here is the AutoHotkey HotString tutorial Video