The SynonymLookup.ahk Web Data-Driven App Fails (AutoHotkey Adjustments)

If the Source Code for a Web Page Changes, You May Need to Rewrite Your Web Data-Driven Script, Plus More AutoHotkey Tips

Because I do a great deal of writing, I’ve fallen in love with my SynonymLookup.ahk script which pops up a menu of alternative words for instant replacement in my documents. It’s pretty cool—even if I do say so myself. However, the other day, it ceased working.

After highlighting a redundant word, I initiated the Hotkey combination searching for an equivalent term. Nothing happened! No matter how much time passed, the script displayed nothing.

After investigating, I discovered that (exactly as I had contemplated in the first SynonymLookup.ahk blogThesaurus.com had changed the formatting of the target page source code causing my Regular Expression (RegEx) to fail. The manufactured GoTo loop I used to increase the reliability of the Web download created an infinite loop.

I needed to adapt. Continue reading

Advertisements

Recognize Running Scripts with System Tray Icon Techniques (AutoHotkey Tip)

If You Run a Number of AutoHotkey Scripts Simultaneously, Distinguish Each Icon in the Windows System Tray with These Menu Commands

At times, I’ve found that I have six or more AutoHotkey scripts running at the same time. Each one adds the little green icon with an embedded “H” to the Windows System Tray. This gets confusing. I can only tell them apart by hovering the mouse cursor over an icon and reading the script name in the Tooltip pop-up message. Sometimes the Tooltip alone doesn’t do an adequate job. Continue reading

Encapsulate AutoHotkey Code for Multi-Script Integration and Portability (Scripting Techniques)

Run Your AutoHotkey Scripts as Standalone Apps or Add Them Unaltered to Master Scripts by Creating Hermetically Sealed Auto-Execute Modules

If you’re anything like me, you’ve written a number of scripts which you use regularly. You can run each app separately assuring that they don’t conflict but that tends to load the Windows System Tray with too many icons—making it a little difficult to track all of them.

Cover 250 BorderOn the other hand, combining the scripts into a single file presents problems of its own. Any script which contains its own auto-execute section must run this part of the code when it first loads. Simply using the #Include directive won’t do the job. Place it in the top of the file and the other script modules, such as Hotkeys, Hotstrings, and Label subroutines, stop the processing of the original auto-execute section. Yet, if you place the #Include at the bottom, AutoHotkey never sees or runs the new auto-execute section. The novice scriptwriter often solves the problem by breaking apart the script and separately adding the auto-execute section to the top of the master file while locating all the other code modules toward the end of the file.

Continue reading

Using Unique Icons for Specific Windows Shortcuts (AutoHotkey Menu Tip)

Draw Icons for AutoHotkey Menus Directly from Windows Shortcuts

I talked extensively in an earlier blog about adding icons to the menus in the QuickLinks.ahk script by using the FileGetShortcut command. This AutoHotkey command digs out data such as the target program from the shortcut. At the time, I didn’t attempt to use the captured icon data (OutIcon and OutIconNum—icon location and number respectively) because, in most cases, the variables came up blank. Even using the standard context menu creation option (New⇒Shortcut) often did not save the icon data for viewing with GetFileShortcut. Frankly, that would have made the process too easy.

Continue reading

New Version of QuickLinks AutoHotkey Script

Many Changes to QuickLinks.ahk Previously Discussed, Plus a Few New Features Not Yet Covered! Now Available for Download!

I’ve finally posted the latest version of QuickLinks.ahk which includes all of the discussions from the past few weeks—plus a couple more features and fixes which I plan to talk about in the near future. Continue reading

Finding Windows Icons for AutoHotkey Menus (Quick Tip)

A Useful AutoHotkey Script for Quickly Identifying Icons Embedded in Other Windows Files

In the last blog, I demonstrated how to add icons to the QuickLinks.ahk menus. The use of the tiny graphics makes it easier to pick out particular menu options. But, you need to know where to look for icons. Once found, you can easily add an icon to your menus directly from a Windows file (e.g. EXE, DLL, etc) without creating new image files. Continue reading

Spice Up AutoHotkey Menus with Icons (AutoHotkey Tip)

Using the Right Images Make Your AutoHotkey Menus Both Prettier and More Useful

It’s easy enough to put together a plain vanilla AutoHotkey pop-up menu without any icons. The sample QuickLinks script creates a menu from favorites Windows shortcuts in the QuickLinks folder. However, a stripped down menu looks pretty boring and makes individual items harder to find. Continue reading