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

Quick Tip: Using the Sleep Command with Clipboard Routines

Use the Sleep Command to Debug Intermittent Routines

tipsLast night, I received the following comment from Thom Blake about last week’s blog “Auto-Capitalize the First Letter of Sentences” prompting this Quick Tip about adding the Sleep command at critical points in certain types of AutoHotkey routines:

Jack

Great script but I seem to have a problem with the capitalize a word function. It only works intermittently. The message box says “No text selected!” when clearly there is.

Thanks, Thom!

This is a needed reminder about a common problem when using the Send command with the Clipboard routine. Sometimes, for whatever reason, certain commands execute before the completion of the last action. In this case, AutoHotkey attempts to copy text to the Windows Clipboard before the SendInput text selection action completes: Continue reading