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

Using INI Files for Web Address Letter Case-Sensitivity Problems (AutoHotkey Quick Reference Script, Part Four)

The Wrong Capitalization of Letters in URLs Can Cause Page Access Failure—A Trick for Using an INI File to Solve Case Problems in AutoHotkey

In an effort to take advantage of the hidden index built into the AutoHotkey.com site, I’ve started writing a script I call AutoHotkeyQuickReg.ahk which parses the downloaded pages. The first step involved those searches which downloaded a command page.

AutoHotkey Library Deal
AutoHotkey Library Deal

The original version of the AutoHotkey Quick Reference script pops up a MsgBox which displays the syntax of the command, then offers the option to open the Web page in the default browser. Recently, I added a new feature which parses and displays information about the built-in AutoHotkey variables whenever detecting the “Variables and Expressions” page. However, I had to find a way to deal with the problem of letter case (capitalization) sensitivity. Get it wrong and either the Web page doesn’t come up or the right data won’t load. Continue reading

New Hotkey Book! (AutoHotkey Tips and Tricks)

AutoHotkey Techniques and Best Practices E-Book for Automating Your Windows Computers with Hotkey Combinations—Includes Something for Everyone!

Whether you’re a noobie to AutoHotkey scripts or an advanced programmer, of all my books, AutoHotkey Hotkeys may be the most important for new little-known tricks and useful ideas. It’s not that the other books don’t cover significant features of AutoHotkey, but this book includes some of the most practical tips for adding power to your scripts. I didn’t plan it that way. 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 RegExReplace() function, then clean up any extraneous HTML tags. Continue reading

AutoHotkey Quick Reference Script (Part Two)

The AutoHotkey.com built-in Index Reappears—Now to Build a Reference Tool!

autohotkeybooks160x600As I ventured in a new direction toward creating AutoHotkey reference scripts, I once again tested the previously discovered hidden AutoHotkey.com index (which had vanished). It re-emerged!

This left me in a quandary. Do I continue in my new direction or take up the original quick reference tool I began building with this AutoHotkey.com secret capability? Since the hidden index offers so much power, I decided to continue on my first course. (The possibility that the feature may disappear again looms over my work, but any Web site can change.) Continue reading