Radically Improving AutoHotkey GUI Apps with Menu Bars

While GUI Menu Bars Make Your AutoHotkey Apps More User-Friendly, the Benefits from Adding One to Your Script Go Far Beyond the Obvious

* * *

This blog represents the first in a series that revisits the InstantHotstring.ahk script introduced and developed in previous posts—starting with “Create Instant Hotstrings Using the AutoHotkey Hotstring() Function.” In this new endeavor, I add a GUI menu bar which significantly alters my view of the app. The benefits of implementing a GUI menu bar greatly exceed its functional use.

* * *

I consider most of my scripts demonstrations of how to implement AutoHotkey possibilities—not completed applications. I rarely go back to do all the little things that will make a script a finished product—in two senses of the word: virtually completed and fine-tuned. Many of my favorites (QuickLinks.ahk, MousePrecise.ahk, SynonymLookup.ahk, AutoCorrect.ahk, ChangeVolume.ahk, etc.) don’t require much additional work—if any—although, a script rarely achieves perfection. Most of my scripts use menus, Hotkeys, or Hotstrings while running in the background—not requiring extra visual bells and whistles. However, once you base an AutoHotkey script on a GUI (Graphical User Interface) pop-up window, the need for additional finishing touches increases—especially if it opens and saves files.

One of the best methods for finishing an AutoHotkey GUI app involves adding a menu bar. (You might also argue that the writing of a GUI script should start with a menu bar. It creates a road map to the finished product.) On the surface, a GUI menu bar makes the app more user friendly, but, more importantly, the process forces you to rethink the design and structure of your script.

Continue reading

AutoHotkey Tip of the Week: Guidelines for AutoHotkey Function Libraries

When Using Function Libraries, You Don’t Need to Embed Your Functions into Each of Your AutoHotkey Scripts—But Sometimes Keeping Them Close Works Out Better

In the past two blogs, “Dynamic Regular Expressions (RegEx) for Math Calculating Hotstrings” and “The Eval() Function for Hotkey Math Calculations and Text Manipulation“, I highlighted two different powerful, auxiliary (not built-in) AutoHotkey functions: RegExHotstrings() and Eval(). Normally, you might embed a user-defined function inside your script but these two functions take up quite a few lines of code. Plus, you might want to use those same functions in a number of different scripts. Adding them to each script can get a little cumbersome—even when using the #Include directive.

Fortunately, when loading a script, if AutoHotkey doesn’t find a directly called function inside the script, it automatically searches the special Function Libraries. But, before you race to put all of your functions in one of those Libraries, you should consider a number of factors. Continue reading