Windows autocorrect- Use AutoHotKey to replace text in any Windows program

windows autocorrect

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.

Adding HotStrings in AutoHotKey

Text file explorer-Determine file headers & delimiters without opening file

Text file explorer

Text File Explorer

I often work with large text files in which the file extension (.txt, .dat, .csv, .tab) doesn’t always indicate what type of delimiter is used in the file.  When the file is small, I’ll typically just “pop” it open in SciTE / Notepad.  Large files (anything over 20 megs) often take a fair amount of time to read and very large files ( a gig or more) will often run into out of memory issues.

On top of wanting to know the delimiter, I also frequently want to know what fields / Headers are in the file.   This normally means I have to open it in a text editor or Excel and review.  I wrote the below Text File Explorer in AutoHotkey script to simplify the above.  I can highlight a file from Windows Explorer and quickly detect the type of delimiter plus display headers if I care to.

Text file explorer AutoHotkey code:

Here’s a video demonstrating the usage of the Text Explorer

Text file evaluator-Determine Type of delimiter and File Headers

Web Scraping with AutoHotkey 101.5-Returning InnerTEXT, Value, OuterHTML

Web Scraping with AutoHotkeyThis is a quick review of getting text from a page using Web Scraping with AutoHotkey.   Often people new to Web Scraping will get hung-up on a minor detail wasting a lot of time.  This video helps point out a few of the common issues like not having a valid pointer and returning the wrong attributes.  Here is a link to the iWB2 Learner tool (remember it only works with IE.  If you’re beyond this video you might also check out this one dealing with troubleshooting.

Below is the code I review in the video

Web Scraping with AutoHotkey video overview- Returning the correct content

Web Scraping with AutoHotkey-101.5 Getting the text from page

Standardizing SPSS file import- Greatly simplify opening text files

spss file

SPSS File import

Importing “wide” (lots of variables)  data in SPSS can be tedious and time consuming!  Especially when there are lots of string and numeric variables having different widths which you plan to use / merge with additional files (String variables need to be the same width).

I wrote an AutoHotKey script to automate setting the width and decimal places plus align string and numerics to make it easier to differentiate between them.   It sounds kind of crazy but, if you watch the following video, you’ll see how much easier the import SPSS file import is to work with.

Standardizing SPSS file import- Greatly simplify opening text files