AutoHotkey webinar: Getting text from programs with AutoHotkey

Blue keyboard key labeled Webinar on a white keyboard, next to Ctrl and Menu keys

Video Hour 1:  High Level: Getting text from programs

General ways (there are more) to get text & the order to try them:

  1. Using COM to extract text from programs like: Excel, Word, PowerPoint, Outlook, IE
  2. Getting Text from PDFs
  3. Using Active Accessibility Viewer & UI Automation
  4. ControlGet
  5. Copy / Paste (when all else fails or when just need a quick solution)A white stress ball with the green AutoHotkey logo being held in a hand, with a laptop keyboard blurred in the background
  6. OCR – Optical Character Recognition

Video Hour 2: Coding and Q&A

Script Highlight: Chrome.ahk by GeekDude

  • Automate Chrome without Selenium
  • Not as robust as COM w/IE but a great start at basic automation
  • Connect to running Chrome (running in Debug mode)
  • Page navigation
  • Get / Set elements & JavaScript Injection
  • Print pages to PDF
  • Capture to Screenshot
  • Some tutorial videos

Resources for getting text from programs

COM– Microsoft’s Component Object Model

Extracting from PDFs

Active Accessibility Viewer & UI Automation

Active Accessibility & UI Automation are built-in Microsoft architecture that can allow you to, programmatically, get text from programs

Let’s see a few examples using:

  • UI Automation via Jethrow
  • Screen Reader – UI Automation by nepter

Two women in an office smiling at a computer screen, one pointing at it while the other sits beside a green bottle on a desk.

ControlGet

On standard Windows controls, you can access them with ControlGet

  • Some things like listboxes, listviews, etc. have some pretty cool capabilities
  • Often newer programs do not use the standard window controls :(

OCR – Optical Character Recognition

 

Generate Outlook Address book from all emails in Outlook

Generate Outlook address bookA white stress ball with the green AutoHotkey logo being held in a hand, with a laptop keyboard blurred in the backgroundWouldn’t it be nice if you could generate Outlook address book from your email traffic?

This video demonstrates a script I wrote that allows to select which Outlook folders you want to iterates over and then loops over them storing key info like: name, last received email date from, # of emails, Size of attachments, etc.  The script even keeps track of emails you’ve already iterated over so you can run it multiple times yet it only counts the email once.

Generate Outlook address book

Close-up of a laptop keyboard and touchpad with a USB drive and Intel and Windows stickers, showing a hardware setup for scripting