Moving Forward with AutoHotkey Chrome.ahk Tools

My Last Three Blogs Offer a Basic Introduction to Installing and Running the Chrome.ahk Web Page Automation Tools—Find More Resources for these Useful Functions

In my earlier blogs, I posted a beginner’s introduction to GeekDude’s Chrome.ahk Web page automation tools:

I wrote these columns to bridge the gap between the novice-level user and the videos produced by GeekDude and Joe Glines—even causing me to take time to allow the techniques to ferment in my brainpan. While the videos provide excellent information, they assume a certain level of user experience. Hopefully, my blogs provide enough insight to allow new users to:

  1. Develop a basic understanding of how Chrome.ahk functions facilitate the completion of Web forms while highlighting the complications from HTML and Javascript code.
  2. Make a decision about whether they will continue to pursue these Web automation techniques.

After this reference blog, unless someone asks me specific questions about Chrome.ahk, I intend to move on to other topics.

Continue reading

Using Chrome.ahk AutoHotkey Tools to Automatically Fill-in Web Forms (Part 2)

How to Write Javascript Code for Web Page Automation Using AutoHotkey Chrome.ahk Tools—Digging into the Quirks of Javascript

In my last blog (“Using Chrome.ahk AutoHotkey Tools to Automatically Fill-in Web Forms (Part 1)“), I discussed how to reveal Web page control names in the source code. This time, I explain how to use those control names to write Javascript expressions for inserting data into text fields and activating menu items and buttons.

Javascript Code

HTML code creates the Web page structure—including editing fields, menus, and buttons. We use Javascript commands to initiate action within the static HTML Web. The functions found in Chrome.ahk AutoHotkey tools use Javascript expressions to send commands to the active Web page by channeling those directives through a Chrome debugger channel. You must use Javascript to communicate with the Web page.

Continue reading

Using Chrome.ahk AutoHotkey Tools to Automatically Fill-in Web Forms (Part 1)

Analyze Web Page HTML Code to Find Control Names and/or IDs for Writing Javascript Expressions for Automating Web Forms Using the Chrome.ahk Library

Logging into online accounts ranks as one of the most common motivations for AutoHotkey users automating Web pages. Using screen-level AutoHotkey Web page automation can get cumbersome. For more reliable and accurate solutions consider source-level automation using the AutoHotkey Chrome.ahk Library of tools. However, before automating any Web forms with these functions, you need to accomplish two tasks:

  1. Analyze the Web page to identify the target HTML controls’ name or id (e.g. text fields, buttons, etc).
  2. Write Javascript action expressions for use with the Chrome.ahk library.

In this blog, I introduce how to identify the controls required to fill in a Web form. In my next blog, I’ll address the more complex task of writing the Javascript expressions for Web page input.

Continue reading

Installing Chrome.ahk AutoHotkey Web Page Automation Tools

Although It Comes with a Bit of a Learning Curve, the Chrome.ahk AutoHotkey Library Offers More Precise Source-Level Web Page Automation

(Updated November 5, 2020) Last time, I highlighted the limited techniques available for automating Web pages at the screen-level. The Web browser insulates the user from the underlying HTML and Javascript page code preventing the use of control names for automating Web pages.

This time, I introduce source-level Web page automation running a short test script after installing a set of Google Chrome AutoHotkey source-level Web page automation tools—Geekdude’s Chrome.ahk Library. I’ve set up a test page called “Jack’s AutoHotkey Chrome Test Page” for a quick trial of the tools. (When initially viewing the test Web page, you should see a set of three empty input fields: First Name, Last Name, and Street Address.) In this blog, I discuss how to install and set up the Chrome.ahk tools—then access the setup by running a sample AutoHotkey script that automatically fills in the three input fields:

The test script inserts data into the three input fields, then displays a Chrome message box displaying, “Hello World!”

If you can get this test script running with your Chrome browser, then a totally new world of Web page automation opens up.

Continue reading

Fixing AutoHotkey Web Lookup Scripts

If a Web Page Changes Format, the Data-Extracting Regular Expressions (RegEx) May Need Updating—Fixing the SynonymLookup.ahk Script

When writing a blog, I tend to use certain words over and over again. While rereading early versions, these redundant words jump out at me. Not only do they point out my limited vocabulary, but the repetitions tend to render my blogs a little more starchy and boring. That’s why I often resort to my always-loaded SynonymLookup.ahk script. This app saves time while making me look a little smarter.

The current version of SynonymLookup.ahk script lists more possibilities and marks antonyms (most of the time) with a caution sign (). (Click image for expanded view.)

After I discover a duplicated word, I highlight it, then hit the Ctrl+Alt+L Hotkey combination. A menu of possible replacements pops up. I click on the one that best fits my intent and the new term immediately displaces the original text. I habitually use this script.

When the SynonymLookup.ahk Script Breaks

Over the life of the script, I’ve encountered the menu shown at right a couple of times. This menu pops up whenever the script downloads and scans the source code 10 times without getting a RegEx hit—usually the result of code changes made by the source page Webmaster.

Continue reading

AutoHotkey Tip of the Week: Cramming a Multitude of Controls into a GUI

AutoHotkey GUI (Graphical User Interface) Controls Gives Us Powerful Tools for Building Apps, But Sometimes We Need to Get Creative to Solve the Space Problem


My book AutoHotkey Applications: Ideas and Tips for Writing Practical AutoHotkey Scripts introduces the various GUI (Graphical User Interface) Controls available in the Windows operating system. I offer practical examples of how you can use single controls in a script. Yet each GUI control comes with its own particular limitations. Sometimes it takes a combination of techniques to get the full benefit from a unique control feature.

For example, you may find it a challenge to pack a multitude of items into a single GUI without expanding it beyond the screen. Many controls such as an Edit and ListView control allow you to limit the size of the control—then add scrollbars when the volume exceeds the confines of the space. Not so for AutoHotkey GUI Link controls.

In my last blog, “Cull Web Links from a Web Page and Activate Each in a Pop-up GUI“, I built a GUI pop-up window listing the external links scraped from a Web page (WebLinkFindURL.ahk script). In some cases, the number of links far exceeded the space allowed on my computer screen. Since the GUI Link control does not support scrollbars, I added Tab controls to expand the available GUI space without overwhelming the screen. Continue reading

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

Update to IPFind.ahk World IP Address Location AutoHotkey Script

The Original Stopped Working; The New Web Page Offers Better IP World Location Information

IPFind New

I plan to write a more detailed blog on the topic, but I recently discovered the IPFind.ahk script not working.

I’ve updated the IPFind.ahk world IP address location script with a different Web page. The original site stopped working and provided less information. (The image at left shows the new IPFind message box.) I’ve added the change to my list of future blogs. Continue reading