r/applescript • u/Bio-Borg • May 25 '22
Applescript to open (mail) URL scheme via clipboard?
Hi folks,
Very new to AppleScript and hoping someone can help.
I use an AppleScript which I got on the MacSparky website which uses URL Schemes and AppleScript to create a link to a highlighted email in macOS mail app. I can paste this into certain task managers as a link back to the email etc. It works great. However, I've started using Notion and Notion doesn't support these URL schemes. It will paste the URL into Notion as a text string but its not clickable. So, basically pointless.
I also use Keyboard Maestro a lot and was thinking that if I created a drag and drop script to do the following, it would be a simple workaround.
1 - double click the text string
2 - copy it to the clipboard
3 - run an AppleScript to open the email using the clipboard contents.
However, I have no idea what to script to make number 3 above happen. Presuming its get clipboard and pass this through to mail app, tell mail to open this URL. etc.
I've messed around for about an hour with no success.
Although, I'm convinced its a simple script. It eludes me!
Any help appreciated!!
Thanks.
1
u/YOUSICKFUCKguy May 25 '22
I’m not familiar with Notion, so not sure if this is possible but Slack has issues with the MailID links, too. The workaround for me is to post a message (like simply “here”) and then hyperlink that word with the MailID link.
Have you tried that in Notion (or something similar)?
2
u/[deleted] May 25 '22
[removed] — view removed comment