29 Mar. 2020
AppleScript is something I’ve always knew by name, but never really got into it. I know it is a language used to build tiny programs on top of MacOS, to automate some tasks, to create shortcuts, basically to do things computers are supposed to do in the first place: compute things.
I am not even sure if what I will be describing below is technically an AppleScript, or a program, or an app, or whatever, but for the sake of simplicity, let’s say it is an AppleScript. Forgive me if I butcher the terminology in this post.
Having recently switch to Drafts and optimised it with a few Markdown shortcuts native to the app, I decided to take things one step further and optimise my MacOS workflow itself. Nothing too fancy, nothing too complicated. I only had one AppleScript in mind, one I’ve heard John Gruber mention once on The Talk Show: a script to quickly paste opened Safari tabs URLs into the document you’re working on.
This tool allows you to do it with a couple of keystrokes and clicks only; which is way faster than respectively switching apps, going to the URL bar, copying the URL, switching back apps, and finally pasting. And the more URLs you need to paste, the more useful the script becomes.
Gruber has generously made the code available on Github: Paste URL From Safari Tab — so, how does it work? I struggled a little myself finding the information I needed to make everything work perfectly, so I thought I’d share a simple step-by-step guide for beginners like me.
This should take 2 or 3 minutes.
And voilà: the quick-access list of your Safari tabs, with their URLs ready to be pasted from your favourite text-editing app. That was easy. Now I wonder: Are there any other “AppleScripts” I should know about? Like usual, let me know on Twitter or via email. Thank you for reading.