Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In a similar way to what gmail allows, I'd like to get specific senders' remote images to be auto-loaded.

One option that I came across is using a rule and an applescript: https://discussions.apple.com/thread/2405934

However, this doesn't seem to work (at least on the current 10.7.3 - that solution is a bit outdated)

Any ideas how to fix this applescript or, alternatively, another way to achieve the desired end result?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

You have been bitten by the brittleness of GUI Scripting solutions – viz. their dependency on the UI element hierarchy of the target application. In the case of Mail.app, this hierarchy has changed rather drastically with Lion (no surprise there, as Lion’s Mail.app was a rather drastic update from earlier versions). The correct UI address of the “Load Images” button is now

button 1 of UI element 1 of row 1 of table 1 of scroll area 1 of window

As this is rather a mouthful to chew on, I’d recommend modifying the original script to operate on a reference, changing the core GUI Scripting command as follows:

set loadButton to a reference to button 1 of UI element 1 of row 1 of table 1 of scroll area 1 of front window
if loadButton exists then click loadButton

Note, however, that this does not actually reproduce Gmail’s behavior – it will just open all mails meeting the rule condition(s) in a viewer window with inline server images displaying each time the rule is run. It does not affect inline message display (in the message preview column), nor does it apply when you open the message in a new window yourself. Barring writing your own Mail.app plugin, there is nothing you can do about that, as the only event processing mechanism Mail.app offers you can hook into with AppleScript is executing rules.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.