One of the things that came up in the Tinderbox Forum discussion on using AppleScript with Tinderbox and Mail, was getting a rich text formatted link into the text of a note.
If you used AppleScript to get the URL for an email and placed it on the clipboard, it appeared in UnClutter, my clipboard manager, as clickable link. That is, click on it and it opened that email. But if you then pasted that same link into the $Text of a Tinderbox note, it was just text, not a clickable link.
It turns out that if you enter a space after that text, Tinderbox would automatically make it a link. It just needed something like a prompt.
It became irrelevant for my purposes, because it was also easy to use AppleScript to populate a URL attribute in a log entry, and that is, by design, clickable. And it kept the raw link out of the text as well.
One of the most experienced Tinderbox and AppleScript users posted an AppleScript that would get the email URI and then run a terminal command to convert it into rich text format with the subject of the email being the clickable text, and place the result onto the clipboard.
While that wasn't required for my purpose, I tried it out to get some more experience with AppleScript and the Terminal. Well, the only thing that appeared on the clipboard on my machine was the text of the subject line.
Thinking I may have omitted something obvious, I rather foolishly asked if that were the case. The answer was "No," but then I got a six paragraph commentary about using third party apps to do things that MacOS is perfectly capable of doing itself. Example:
Those can provide benefits in some situations, and can be fun to play around with. But when I’m trying to think and get work done, as opposed to play with the process, I’ve found they can be more trouble than they’re worth.
I didn't want to get into it with the guy in the forum, I'm certain he intended to be helpful, but I could have done without the commentary.
There's a certain personal attraction to various types of "purity." In my case, in the matter of blogging, it's the use of static html on a server at a URL that I have some control over, as opposed to some of the other approaches to blogging where your "content" is served up "dynamically," and woe be unto you if you don't keep up with the security updates.
Some people fetishize "plain text." A "note" can only be a plain text file, and then you use the file management and automation facilities of the OS to organize those files into whatever structure you feel best supports your needs.
There's nothing really wrong with that, except I think it gets a little tedious sometimes, proselytizing about it. I suppose when you have the "floor" in a "forum," and a great example of the superiority of your view is made manifest by the preceding question, well, it's an opportunity that is simply too hard to pass up. They can't help themselves.
Anyway, I'm fortunate in that I'm not trying to "get work done," because I'm retired. And I suppose my thinking is impaired by any number of personal flaws and failings, the least of which is perhaps my affinity for third party apps.
It did cause me to dive down a rabbit hole, trying to understand what was going on with my clipboard. I ran the terminal command in Terminal, minus the part about putting it on the clipboard, typing in the values of what had been variables in the AppleScript. The output was a lengthy bit of text that I took to be rtf markup. When I ran the command again, this time with the clipboard bit, what seemed to appear on the clipboard in UnClutter was just the subject of the email, as before.
Then I went for my walk.
I really don't know why it doesn't appear as an rtf link on the clipboard in UnClutter. I'm not sure it matters, as the amount of stuff I "don't know" about Unix and AppleScript and terminal commands could fill volumes. I'm usually content to know how to do something without really understanding why it works. This limitation is exposed when something doesn't work, despite employing the seemingly correct "how."
Sometimes I pursue it, as with Tinderbox. Other times, well, life is too short.
When you ask for help, I guess you can't be too particular about how it's delivered.
As for third party apps, there are a ton of clipboard managers. There's one built into LaunchBar, a third party app that I use that could probably be replaced by Spotlight and AppleScript and Terminal. I suppose I could read about the clipboard manager in LaunchBar and get rid of UnClutter. I don't use the Files portion that much, and the Notepad is really just where I stash a bit of text I may want to use later that might scroll off the clipboard history.
But a clipboard manager of some kind is invaluable to me. I can copy a bit of text from a web site that I intend to quote in a blog post, then copy the URL, all in Safari, switch to Tinderbox and write my blog post, switching to whichever bit of text I need in the clipboard manager. No need to switch back and forth between Safari and Tinderbox. (Yes, I know CTRL-Tab makes that trivial.)
I suppose someone could point out to me that there's a clipboard manager built into Mac OS, I just don't know about it.
Originally posted at Nice Marmot 09:50 Friday, 8 March 2024