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

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

Checking Your Internet Connection, Plus a Twist on a Secret Windows Feature (AutoHotkey Quick Tips)

If Your AutoHotkey Script Depends Upon Internet Access, Check for an Active Connection Before Continuing, Plus a Surprising Trick for Accessing Hidden Windows Features

Seven Book AutoHotkey AutoHotkey Library Deal!I’ve written a number of scripts which access the Internet for data: IPFind.ahk for locating where in the world an IP address resides; RhymeMenu.ahk for popping up a list of rhymes for any selected word; SynonymLookup for replacing boring words (the impetus for this blog); AutoHotkey Quick Reference, both the now-defunct AutoHotkey reference tool and the new AutoHotkey reference tool currently under development require the Internet; and (not by me) the GooglePhraseFix script posted on the AutoHotkey forum by aaston86; plus, any script which attempts to launch a Web page. All of these apps require an Internet connection to work. Continue reading