Change Script Features on the Fly with the Windows System Tray Icon Context Menu (AutoHotkey Tip)

Dynamically Switch the Actions of a Running AutoHotkey Script with a Simple Click of a System Tray Right-Click Menu Item

From Rick Corbett:

Hi, Jack,

Talking of “Adding Actions to Windows System Tray Icon Menu“, perhaps you would consider writing about using—for example—ToggleCheck, MenuItemName to amend a running script dynamically, i.e. change something (like toggling logging to a file versus a MsgBox), then reload.

*          *          *

AutoHotkey Library Deal
AutoHotkey Library Deal

That’s an excellent question, Rick! Often, after loading a script,  we want to either turn features off and on or change how they function. Adding separate Hotkeys or rewriting scripts becomes wearisome. But, what if we could add a feature to the Windows System Tray Icon Context Menu (right-click) which either toggles an action on and off or completely changes how it works? AutoHotkey offers a straightforward way to get it done. Continue reading

Why AutoHotkey for Students?

Ten Reasons Why Every Student Should Use the Free AutoHotkey Windows Tools! AutoHotkey Helps You So Much Academically That You’ll Think You’re Cheating! Plus, It’s Delicious Brain Food and Helps Get You a Job!

Using AutoHotkey should be mandatory for every student from high school on through college! Not merely because learning AutoHotkey invigorates the brain cells (which it does!), but robotsexismit makes all your Windows tasks so much easier that it seems unsporting. AutoHotkey takes the grunt work out academia making learning fun…almost.

(If you know a student who uses a Windows computer, then do him or her a favor by sending him or her a link to this article. If he or she doesn’t already know about AutoHotkey, he or she will thank you profusely.)

For those unfamiliar with the free open-source scripting language, AutoHotkey offers simple, yet powerful, commands for adding enhancements to any Windows computer. In addition to their simplicity, the little apps work in any Windows program or on any Web page. For a brief overview, see this “Introduction to AutoHotkey: A Review and Guide for Beginners.” Continue reading

Too Much Planning Can Get in the Way of Good Scripting (AutoHotkey Quick Reference Part Five)

While Preplanning Script Writing Can Be Useful, Don’t Take It Too Seriously—Sometimes It Only Makes Sense to Rewrite Everything

The AutoHotkey script writing process rarely runs in a straight line. Often I start with a vague concept of what I want to do then start fiddling with the tools. Unlike when building a toolshed or bookcase, I rarely begin with a complete plan or blueprint for an AutoHotkey script. In fact, the code may undergo numerous changes during the debugging and problem-solving phases.

sarcastictweetsFor anyone who builds things, this approach may be disconcerting. Afterall, you can’t afford to build a house by trial-and-error. The cost of wasted materials would be prohibitive. Traditionally, we spend a great deal of time in the planning phase to make sure we avoid expensive mistakes. Even in computer programming, large projects come together much better after extensive planning. But with smaller projects such as AutoHotkey scripts the opposite may be true. I often start a script with only a vague idea of what I want to do. As I work on it, the possibilities expand and I often change course. Continue reading

Ryan’s RegEx Tester for Building INI Data Files (AutoHotkey Quick Reference Script, Part Five)

Sometimes It’s Quicker and Easier to Use Ryan RegEx Tester Rather Than Writing an AutoHotkey Script

I used Ryan’s RegEx Tester in an earlier blog to create Web links without writing an AutoHotkey script. This time I take advantage of this powerful tool by using it to extract data for insertion into the regexrobotcartoon INI file discussed in the last blog on this topic. The fact that you can paste any text into the top of the RegEx Tester, add a Regular Expression (and a substitution expression for RegExPlace()), then extract the altered text from the bottom pane makes it a unique AutoHotkey app. This capability alone can motivate someone to learn how to write Regular Expressions.

Note: This series of blogs discusses the evolution of the AutoHotkeyQuickRef.ahk script which takes advantage of the hidden index in the AutoHotkey.com Web site.

Continue reading

Regular Expressions (RegEx) for Parsing Text (AutoHotkey Quick Reference Script Part Three)

The RegExReplace() Function Makes It Easy to Extract and Cleanup Text, Plus a Quick-and-Dirty RegEx to Strip All HTML Tags

commandsyntaxLast time, we accessed commands at AutoHotkey.com using its hidden built-in index. Whenever the script downloaded a command page, we identified it by the embedded HTML code <pre class=”Syntax”>. Not only do the <pre class=”Syntax”>…</pre> tags identify the command pages but they surround the proper syntax for that command. Since this easily located HTML format appears in every command page, it can be used to launch a quick reference pop-up window. We only need to parse the command syntax with the RegExMatch() function, then clean up any extraneous HTML tags. Continue reading

AutoHotkey and Linux

Why Isn’t There a Linux Version of AutoHotkey for Automating Computer Systems?

When someone likes something, they want it everywhere. Many AutoHotkey lovers question why the free Windows-base scripting language hasn’t invaded other operating systems. AutoHotkey works great for many Windows users and some want the same (or similar) capabilities in Linux. However, there are numerous reasons why an actively supported version of AutoHotkey does not exist outside Windows. Continue reading

Windows Programming Made Easy (Why AutoHotkey?)

Never Programmed Before? You’ll Find No Better Language for Learning Than AutoHotkey!

Note: A free scripting language for Window computers, AutoHotkey provides simple techniques for controlling and adding power to your PC. Since today (and into the foreseeable future) Windows PCs continue to represent 90% of the desktop and laptop computers, knowing how to write simple AutoHotkey scripts adds significant experience to anyone’s résumé. Do it for fun and profit! Continue reading