Re: Mail - Extract Links
Re: Mail - Extract Links
- Subject: Re: Mail - Extract Links
- From: Shane Stanley <email@hidden>
- Date: Mon, 25 Nov 2013 15:31:26 +1100
On 25 Nov 2013, at 2:52 PM, Christopher Stone <email@hidden> wrote:
Contents of a message doesn't pick up embedded links.
Data-Detectors doesn't pick up links broken by quoted-printable.
You have a handy routine for decoding mail source?
This sort of thing?
use framework "Foundation"
on decodeQP:theString set theString to current application's NSString's stringWithString:theString set theString to theString's stringByReplacingOccurrencesOfString:("=" & return & linefeed) withString:"" set theString to theString's stringByReplacingOccurrencesOfString:("=" & return) withString:"" set theString to theString's stringByReplacingOccurrencesOfString:"=" withString:"%" return (theString's stringByReplacingPercentEscapesUsingEncoding:(current application's NSUTF8StringEncoding)) as text end decodeQP:
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden