Hi
I am new to AppleScript and want to use a Mail rule to run an AppleScript that prints a pdf received as an attachment to an email. This is what I have got so far…
on perform_mail_action(info)
tell application “Mail”
set selectedMessages to |SelectedMessages| of info
repeat with eachMessage in selectedMessages
set thePDF to (mail attachment of eachMessage)
save thePDF as “:temp.pdf”
tell application "Finder"
print thePDF
delete thePDF
end tell
end repeat
end tell
end perform_mail_action
This doesn’t actually work but hopefully is heading in the right direction. I f anybody could give some help that would be much appreciated, I have ground to a halt.
Regards