Load Images quickly in Mail

Msgfiler is still doing wonderful things for my Inbox. However, once I was so efficient and keyboard-based for all of my filing needs, the one place that still required a mouse was more obvious: clicking the “Load Images” button for a HTML email message with remote images. By default, I have “load remote images” turned off, but there is the occasional message where I would like to load them. A Google search turned up similar questions, but no real solutions.

So today, I tried my hand at a bit of Applescript programming, and was able to solve it! This is for Mail on Lion - it may require some tweaking on earlier versions of Mac OS X. It also requires that you have “Enable access for assistive devices” turned on in the “Universal Access” preference pane. The script uses the UI Scripting ability of Mac OS X, which lets you target individual UI elements. So, as long as Apple doesn’t move or rename the “Load Images” button, this script should continue to work, no matter the size or location of your Mail window. I trigger it from Butler, but you could save the Applescript as an executable, and then run it from Spotlight, or have it triggered from your LauncherOfChoice. It’s quick and easy and one less reason to use the mouse!

Hope this helps someone else!

tell application "System Events" tell process "Mail" tell UI element 1 of row 1 of table 1 of scroll area 1 of splitter group 1 of splitter group 1 of window 1 tell button "Load Images" click end tell end tell end tellend tell
© 2010-2016 Little Potato Software   Follow littlepotatosw on Twitter        Site Map     Privacy Policy     Contact Me