A while back I wrote a series of articles on using AutoHotkey for Windows program automation. They appeared in the old ComputorEdge Magazine. I used Windows 10 Paint as the example program demonstrating a number of approaches to program control. I temporarily put the articles in a makeshift PDF for artists and intend to include them in a future book—along with a couple of other unpublished Windows program automation articles. I extracted some of those columns from the original ComputorEdge issues and combined them into one free PDF download: AutoHotkey for Artist.pdf. The links may be obsolete, but the info is still good!
How to View the Inner Workings and Hidden Mechanisms of Running AutoHotkey Scripts
AutoHotkey includes a tool called the Main Window which aids with the debugging process. It gives you a peek into various aspects of a running .ahk script:
- Most recently executed lines of code (ListLines command).
- Current variables and values (ListVars command).
- Active Hotkeys (ListHotkeys command).
- Keyboard activity (KeyHistory command).
Open the Main Window by right-clicking on Windows System Tray icon of an active .ahk script and selecting Open from the top of the menu. The window pops open at the “Lines most recently executed” view. You can select the other three views plus “Refresh” from the View menu. Continue reading