Hey Alex,
See my Updated Post #4 in this thread:
Save Apple Mail Attachments to a Specific Folder
I've provided a new working macro in addition to the previously posted AppleScript.
Tested only on macOS 10.12.6 so far.
As for saving URLs to Pocket...
- Getting URLs out of Mail is not too big a task, but you need to know what kind of URLs you're dealing with.
- Is it a plain-text link?
- Is it an embedded link?
Plain text is simple to deal with. You can extract that easily with an AppleScript like this:
----------------------------------------------------------------
tell application "Mail"
set selectedMessageList to selection
if length of selectedMessageList ≠ 1 then error "More than 1 message was selected!"
set theMessage to item 1 of selectedMessageList
tell theMessage
set msgContent to its content
return msgContent
end tell
end tell
----------------------------------------------------------------
Embedded links on the other hand get quite a bit more complicated.
Once you have the desired URL then sending to Pocket via script looks like it's not overly difficult.
-Chris