osx - Mac Automator/Applescript(?) to extract URL's from Mail messages -
i'm trying text document list of links in bunch of email messages reside in latest mac mail.app (os x 10.10.2 yosemite), , stumped.
i thought i'd able just...
- put couple of automator.app actions in service/workflow,
- select/highlight email messages within mail.app,
- select service or run workflow,
- and have text document every url/link found within them all.
however, didn't work.
i figured out how one email message @ time, that's not want. attached screenshot of 3 workflows. first 1 one works 1 email message & highlighting text in & running service. other 2 don't work.
i notice the first shows in service menu single email open; once highlight more 1 email message, option goes away service menu.
any tips or tricks?

i figured out how reach goal, start creating new service within automator (input: "no input", application: "mail")
the first action get selected mail messages (get selected: messages)
the second action exceute applescript following script:
on run {input, parameters} set mailcontentlist {} tell application "mail" repeat selectedmail in input set end of mailcontentlist content of selectedmail end repeat end tell return mailcontentlist end run this script walks through given messages, reads out content , passes list next action
the third action extract urls text
and final action new textedit document
save nice name extract urls selected mails after service available inside services menu inside mail app.
in test found few internal urls without http:// links anchors, maybe want delete urls not start http. can using action before creating new textedit document:
filter paragraphs options "paragraphs start http" (don't know how these parameters called in english automator, sorry)
feel good, michael / hamburg
Comments
Post a Comment