Quick Tip: The Best Way to Paste with the AutoHotkey Send Command

When Using the Send Command to Paste from the Clipboard, a Simple Best Practice Can Make the Difference

tipsI’ve noticed that occasionally a couple of my Clipboard paste Hotkeys would cause a jump to the Bottom of the page in the WordPress editing window—a huge source of aggravation. Fortunately, I rarely used those Hotkeys. Then, while working on my blog for next week, I ran into the problem again in a simple capitalization Hotkey routine. This confused me since my standard uppercase, lowercase, and initial cap Hotkeys work just fine. The new Hotkey wasn’t that much different. I investigated. Continue reading

Brute Force Data-Set Copy-and-Paste (AutoHotkey Clipboard Technique)

I Prefer an Eloquent Solution for Data-Set Transfer Problems, But Sometimes It’s Just Easier to Build a Simple (and More Universal) Copy-and-Paste Tool

*          *          *

I originally wrote the short script discussed in this blog to solve a single data transfer problem. Only after making the script functional did I realized that it could work in numerous different types of data-set transfer environments such as spreadsheets, Web tables, and many other information lists. This AutoHotkey script offers a little less tedious solution to common Windows cut-and-paste problems.

*          *          *

If I need to copy a single section of text into another document, then the Windows Clipboard works find. However, whenever I want to do something more complicated such as moving that same text into multiple data fields or copying data from a table in a document (or on the Web) before transferring it, using the Windows Clipboard can turn into a real hassle. Continue reading

Put Your Emoji Hotstrings in a Pop-up Menu (AutoHotkey Trick)

Unless Endowed with a Photographic 📷 Memory, Who Can Memorize All the Activating Texts ✍ for Over 1000 Emoji 😀 Hotstrings? Use This Menu 🍱 Technique to Find and Insert Emojis 😀 Taken Directly from Your Hotstring Script

Who wouldn’t want all the emojis available at their fingertips? The last blog “Add Emoji Characters to Any Windows Document (AutoHotkey Hotstrings)” does just that. However, with the exception of the icons you use all the time, you won’t find remembering the activating strings easy. We need a quick lookup table to remind us of the activating strings for each image. Even better, why not a pop-up menu which both gives us the Hotstring keys and inserts the emoji? Fortunately, we can do this with a short AutoHotkey routine which searches the original EmojiInsert.ahk Hotstring file for our favorite characters.

Continue reading

Open and Print Files with the QuickLinks App (AutoHotkey Tip from a Reader)

Khanh Ngo Offers an Improvement to the QuickLinks.ahk Script Which Enables the Loading of Any Selected File with Your Favorite Program, Plus QuickLinks Can Now Print Files!

Recently I received the following message:

Hi, Jack,

Library Benefits

I just found your website when searching around for AHK tips and found your QuickLinks—very impressive, with minimal coding needed.

I’m currently making good use of it and added a small improvement to QL_MenuHandler that I think you might appreciate too:

When executing a shortcut, send currently selected files as an argument to that program. Basically, open the selected file with the QuickLinks program.

This is quite convenient when opening a text or image editor.

Let me know what you think.

Khanh

After reviewing the changes to the QuickLinks.ahk script, I saw that with the short piece of code, Khanh had greatly expanded the possibilities. What started out as a tool for quickly opening favorite programs and Web pages turned into a method for opening any file with those same preferred applications. I immediately incorporated the new code in the current download. Continue reading

Build Your Own Dream Thesaurus Word Replacement Tool (AutoHotkey Web Application)

How to Use the Web to Feed Data to Your AutoHotkey Application—A Pop-up Menu to Replace Boring Words in Your Documents

Synonym Page
I highlight any word and hit the CTRL+L Hotkey combination. AutoHotkey downloads the code from the target Web page and parses the synonyms using RegEx—placing each in a pop-up menu. Click on any item and AutoHotkey replaces the selected word in any document or field open for text editing. In the example, the menu lists possible replacements for the word •PAGE—the first item in the menu. Click •PAGE to open Thesaurus.com at the target location.

I immediately added this short AutoHotkey script to my primary toolbox. It immediately provides me access to a list of alternative words in menu form (shown at right). Click on one of the entries and it instantly replaces the previously highlighted word. The apps beauty lies in the fact that I can utilize the Web for the database of synonyms. The script extracts the menu items directly from a Theraurus.com Web page without opening my Web browser or processing any of the code—no ads. For writers and editors (or anyone who wants to expand their vocabulary), this one script provides enough incentive to plunge into regularly employing the free AutoHotkey Windows utility language.

If Theraurus.com ever notices, I suppose this script may not make the owners of the site very happy. Any revenue they derive comes from the advertising. My app ignores all of it. They could change the formatting of the page, but then I would adjust the Regular Expression I use to extract the data. They might make an attempt to block my efforts, but I guess any such blocking technique would also block regular users. They could block my IP, but that would be a lot of work for just one person. (I would simply switch to another site offering synonyms.) In any case, I plan to continue using this AutoHotkey script until it stops working—for whatever reason. Then, I’ll fix it. Continue reading

Accessing Web Pages (AutoHotkey Tips)

Find a Consistent Relationship in URLs to Redirect Web Pages

A while back I wrote a script which accessed the AutoHotkey online documentation quickly bringing up information about commands and variables. It took advantage of a hidden index in AutoHotkey.com which loaded key pages. However, as happened at the time, relying upon that index does not guarantee access. As with any Web page, things change.

The online documentation is currently going through some modifications. Possibly, in preparation for future use with the coming AutoHotkey version 2.0, we see a number of new revisions. With those alterations, the secret index has once again disappeared. That means much of my earlier work no longer functions as designed. I’ve decided to completely redo my AutoHotkey reference app with the following goals:

  1. Drop reliance on any hidden index to quickly return AutoHotkey command and variable information.
  2. Add simultaneously support for both AutoHotkey V1.1 commands and the parallel V2.0 functions.
  3. Add support for locating changes in V2.0 not directly correlating with V1.1 commands.

Continue reading

Automatically Add Windows Shortcuts to the QuickLinks App (AutoHotkey Tip)

Rather than Manually Creating Windows Shortcuts for QuickLinks.ahk, Use the AutoHotkey FileCreateShortcut Command

*          *          *

Recently, while working with the QuickLinks.ahk script, I’ve encountered so many AutoHotkey learning points involving a number of different techniques that I plan to spend the next few blogs discussing the various possibilities. If you regularly use QuickLinks, then you’ll likely want to fashion it to your needs. While most of the tailoring gets done by working directly with the target folders, you’ll find times when changing the code works best. Rather than attempting to deliver a final product for final download, I offer instruction on how to add various features to your version of QuickLinks.ahk and leave the work up to you. The example shown in the image below reflects the changes I’ve made to my personal copy and do not appear in the posted version.

*          *          *

One of the characteristics I like most about the QuickLinks.ahk script is its simplicity. It operates on a basic backbone which includes two loops (the files and folders Loop command). The first loop works through the folders found in the QuickLinks directory creating the top level menu. The second loop adds the individual links in each folder to each main menu item. Continue reading

Why AutoHotkey for Internet Trolls?

If You Plan on Being One of the Most Annoying People on the Web, Why Not Make It Easy on Yourself?

Note: If you’re an Internet troll, please don’t take offense at anything I say here. I’m merely showing how AutoHotkey makes trolling easier—as the free software does with anything you do on any Windows computer. Not that trolls need any help—other than psychological.

Internet trolls patrol cyberspace in an effort to right the wrongs perpetrated by unsuspecting users…or, maybe, they just want to make themselves feel better by making others feel worse. Whatever! The important point is that even Internet trolls can make good use of the free AutoHotkey tools available for their Windows computers.

TrollingRobotSome people think that AutoHotkey software should only be used for good, but if you like to harass people on the Web, right or wrong, AutoHotkey may be the tool for you. Internet trolls will be surprised at how easy AutoHotkey makes harassing people.

Disclaimer: Don’t blame AutoHotkey for this blog. Any tool can be used for good or evil. While a hammer can build a house, it can also tear it down.

(If you’re new to AutoHotkey, please see this “Introduction to AutoHotkey: A Review and Guide for Beginners.”) Continue reading

For Speed, Replace the Send Command with Control, EditPaste (AutoHotkey Tip)

The Control, EditPaste Command Adds Great Speed to Standard Text Insertion Routines—within Certain Limits

My work in the last blog on “Why AutoHotkey for Students?” hatched a couple of personal AutoHotkey epiphanies. After all these years of using and writing about AutoHotkey, I continue to readthemanualsurprise myself with new discoveries. If I had read every word of the documentation (and possessed the ability to remember it all), then I may have understood these insights long ago. However, the AutoHotkey documentation contains a wealth of information which takes a great deal of time to digest.

I can’t fault the online manual because it covers nearly everything. Yet, it doesn’t always point out which bits are the most useful. When I discover a command or technique which significantly improves the operation of a script, I call it a “Best Practice.” Otherwise, I tend to keep using the same old techniques until something causes me to dig a little deeper. Last week presented just such an opportunity.

The biggest problem introduced by discovering these little gems involves going back and testing their limitations, then replacing all my old code lines with the better technique. 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