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 KM routine to do the following, it would be a simple workaround.
1 - double click the text string (easy)
2 - copy it to the clipboard (easy)
3 - run an AppleScript to open the email using the clipboard contents. (no clue)
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.
This probably makes no sense but indicative of where I'm at....
set MessageID to "clipboardText"
tell application "Mail"
activate open (first message of inbox whose message id = "clipboardText")
end tell