Automating Web Pages with AutoHotkey

When Automating Tasks, Browser Web Pages Present Special Problems

Due to the nature of the Internet and the function of Web browsers, AutoHotkey users encounter particular issues when automating Web pages. AutoHotkey GUIs (Graphical User Interfaces) and many older Windows programs allow direct access to controls for automation. Newer apps tend to use ribbon menus which usually include accessible Alt+key shortcuts. However, Web browsers contain built-in protections which insulate users and make controlling operations more opaque. The average Web surfer only has access to what appears on the screen. Getting to the inner workings of Web browsers requires special tools.

After receiving a request from a Web browser, the Web server sends code consisting of HTML and JavaScript to that Web browser. The Web browser interprets the code and sends the results to the computer screen in the form of text, images, links, and controls. The Web browser sends back any user actions requiring server action.
Continue reading

AutoHotkey Tip of the Week: ToolTip Command Tricks

See What You Can Do with the AutoHotkey ToolTip Pop-up!

AutoHotkey AutoHotkey Library Deal!

The ToolTip command acts as a conduit for communication between an AutoHotkey script and its user. Similar in function to other visual information tools (the SplashText command, discussed in a previous blog,  and the Progress/SplashImage command used in the InstantHotstring.ahk script), the more compact ToolTip follows the mouse cursor by default, rather than planting itself in the middle of the screen. You can use the tiny pop-up window in several different ways:

  1. Action Complete ToolTip
  2. Toggle Status Tooltip
  3. Reminder ToolTip
  4. Realtime Informational ToolTip
  5. Instructional ToolTip
  6. Multiple ToolTips
Continue reading

Pasting Date Parts into Forms (AutoHotkey RegEx Tips Part 4)

In Most Data Fields, You’ll Find It Simple to Paste Text or Numbers, But Inserting a Parsed Date Often Requires Extra Steps—Plus How to Change Date Paste Action Based on the Active Window Title

In the first three blogs of this RegEx series, I used Regular Expressions (RegEx) to identify and parse data prior to any paste operations. In this blog, I use a RegEx to identify and parse dates during the multi-part date paste operation. I use the previously introduced \d wild card (any numeric digit zero through nine) and the optional match modifier (the question mark ?), plus, I introduced how to create a selection list of possible matches by using a range of options (in this case, a forward slash, a dash, or a dot [/\-.] as date separators).

*          *          *

Cover 200When working with forms, dates often use three separate data entry fields—one for the month, one for the day, and one for the year. (In the UK, they swap it around to day/month/year.) In some forms, you need to enter a forward slash (/) to jump to the next entry item. Sometimes the form automatically jumps to the next field after entering two digits. In many Web pages, you need to tab between each data entry area. Sometimes, sending the entire copied date as a single string works.

Since I wrote the MultiPaste.ahk script to respond to a particular personal finance program, I set it up to Send the date delimited with slashes. If you want to do something similar for a different software package or Web page, then you may need to tailor the script. This blog shows you how to do that. Continue reading

The Duality of Curly Brackets in Hotstrings (Beginning AutoHotkey Tips)

Curly Brackets {…} in Hotstrings Both Insert Special Features and Neuter Hotkey Modifying Characters—When Properly Used, They Add Flexibility to AutoHotkey Hotstrings

Sometimes you want to do more than simple text replacement with your AutoHotkey Hotstrings. The key to adding those special features lies with embedding either manual keys within curly brackets (i.e. {Left 5}) or adding Hotkey action directly (without curly brackets) such as CTRL+I (^i for italics) or CTRL+B (^b for bold). The fact that the curly brackets {…} behave in two different manners can cause confusion. Continue reading

Create a Universal MsgBox Print Function with ControlGetText (AutoHotkey Tip)

When Nothing Else Works for Copying Text, Try the ControlGetText Command and Create a Global MsgBox Print Function

In a previous blog, I highlighted the Control, EditPaste command. The command helped me solve a particular problem where the standard Send, ^v (Windows paste shortcut) responded too slowly. I’ve since discovered that the complementary ControlGetText command resolves some sticky MsgBox printing troubles. It not only works quicker than the Windows copy shortcut (Send, ^c) but it greatly reduces code. 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