AutoHotkey Tip of the Week: Capture Web Page Addresses (URLs)

When Browsing the Web This Special Function Copies the Page URL without Any Extra Effort

Normally, you can find a Web page address in the URL bar at the top of the browser. Click in that address field and copy it with CTRL+C. That simple act may make the subject of this blog look redundant. However, when applied to last week’s CopyRegTagWin.ahk script, the GetActiveBrowserURL() function can save numerous keystrokes.

By using the user-defined GetActiveBrowserURL() function, a modified version of the CopyRefTagWin.ahk script can include both the title of the source window and, if from a Web page, its URL. If collecting data for research, this feature makes reconstructing sources much easier—without any extra effort. Continue reading

E-mail the Daily Horoscope to Yourself (AutoHotkey Trick)

Combining the Daily Horoscope from the Web with this AutoHotkey E-mail Sending Technique Makes It Possible to Deliver the Prescription to Anyone

In recent blogs, I discussed how to extract data from a Web page (“Quick and Dirty Web Data Extraction Script“) and send an e-mail directly from an AutoHotkey script (“How to Send E-mail Directly from an AutoHotkey Script“). This time I put them both together to demonstrate how to deliver a daily horoscope to yourself (or a friend).

HoroscopeEmail.pngE-mail—the oldest and most universal method for reaching people—offers a major advantage over text messages and other digital forms of communications (e.g. Twitter, Facebook). Most people own at least one e-mail address which they can access from any of their computers (PC, Mac, or Linux), any smartphone (iPhone or Android), or tablet. To send an e-mail, you don’t need to know a phone number or the type of device. E-mail servers push the message directly to the target addressee. Plus, using AutoHotkey, you can automate the periodic sending of an e-mail. Continue reading

Quick and Dirty Web Data Extraction Script (An Easy AutoHotkey RegEx Trick)

A Simple Regular Expression (RegEx) Retrieves Your Daily Horoscope by Harvesting Data from a Web Page—This 10-Line AutoHotkey Script Demonstrates How to Build Your Own Web-Based Pop-ups

Regular Expressions (RegEx) can get pretty complicated, but for this desktop trick, you only need to learn one short wildcard expression. Anyone can implement this simple pop-up window trick—displaying virtually any selected data found on the Web without loading a browser. Perhaps you would like a message box displaying the current weather. Or, maybe you want to read your daily horoscope. If it’s on the Web, then you can probably turn it into a quick AutoHotkey app.

As a demonstration (and possible template for other pop-up apps), I’ve written a short script which, without a browser, accesses an astrology Web page and displays my daily horoscope in a Windows message box. You can find the code for this Horoscope.ahk script at the end of this blog.

Continue reading

New Alternative Free AutoHotkey Scripts Download Site

Augmenting the Original Free AutoHotkey Scripts Page, We Now Offer an Alternative Script Index without the EXE Files

Library Benefits

For a couple of reasons, I’ve created a new download page for the free AutoHotkey script on the ComputorEdge Software Showcase site:

  1. Depending upon Windows security settings, some people have trouble downloading ZIP files which include compiled EXE files.
  2. Recent “Denial of Service” attacks have made the ComputorEdge.com site unavailable in certain parts of the world. (For now, I know of one UK reader who has trouble connecting.)

It just makes sense to offer an alternative download site. 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

Waiting for a Web Page to Load into a Browser (AutoHotkey Tips)

A Look at Techniques for Ensuring a Web Page Fully Loads Before Continuing an AutoHotkey Script

When writing an AutoHotkey script which uses the Web, I rarely open a browser anymore. I either download the source code to a file (URLDownLoadToFile command) or a variable (Example: Download text to a variable technique). That means I don’t need to wait for a Web page to load into a browser—although as expressed earlier similar issues exist.

Web Page Load MsgBoxOne of the most common reasons for requiring a fully loaded Web page involves AutoHotkey auto-logon scripts which insert usernames and passwords before continuing. If the page download hesitates, the script outruns the Web process and sends the data to an empty browser window. Most of the Web download problems brought to my attention by AutoHotkey users relate to auto-login scripts. Continue reading