Then, I pull the name from the sender variable using extract name from because the variable includes the person’s name and their email address, but all I want is the person’s name. Next, I access the subject of the message and its sender. Next, _messageURL takes the message’s message ID and drops it into the URL scheme that will open it in the Mail app regardless of where it is filed. The first step is to set the variable _msg to the selected message in Mail. Mail has extensive AppleScript support, which makes it fairly simple to access the components of a message. Generating a Markdown-formatted link to a Mail message with sender information using AppleScript With that script as my guide, it didn’t take long to create one of my own using Mail’s built-in AppleScript support and a single-action shortcut that doesn’t require Python. The seed for the script I wrote started with a story Federico wrote about how he used Mail’s URL scheme in the iOS 7 days, which drew upon a script John Gruber posted on Daring Fireball in 2007. It’s not hard to install, but I wondered if there was a simpler way to create message links that didn’t include a Python dependency.Īs it turns out, what I set out to do is pretty simple. The trouble is that Python is no longer pre-installed on the Mac. Going into this project, I was aware of an AppleScript that’s been passed around automation forums for years and written about by David Sparks that relies on Python. For added context, my shortcut adds the sender’s name too. However, I’ve improved the experience on the Mac using a combination of AppleScript and a shortcut that I trigger using Raycast to link the subject of a Mail message to its URL. The result isn’t perfect: I still have no choice on iOS and iPadOS but to drag and drop messages. With weeks of Ventura testing ahead of me, I decided to see what I could do to improve the situation. The situation on the Mac isn’t much better, requiring users to resort to AppleScript to construct a URL that links back to a Mail message. I’ll take it, but I’d prefer if I could quickly generate a link from the share sheet or with Shortcuts instead. In contrast, on iOS and iPadOS, you can only link to a Mail message by dragging it out of Mail into another app’s text field. I like the way drag and drop on the iPhone and iPad links a message to its subject, but having to use drag and drop is clunky.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |