828: Revisiting Keyboard Maestro

[Solved] Never mind, figured it out by searching the KM manual. It works in Safari, Chrome, Brave, but not Firefox…

Here’s a simple one I cannot figure out: How do you get (in KM 11) the URL of the current tab in a browser? (ChatGPT thinks that there’s an action called Get URL from Front Browser, which does not exist). Get URL does not seem to support this, but it’s such a basic need I’m sure the developer somehow addressed this.

2 Likes

The biggest advantage to me of mac power users being on youtube is that we can get transcripts of the episodes! I rarely watch videos themselves, but I do use the transcripts a lot to find specific information.

Dave says at 12:46 into the podcast

I just made a Mac Sparky Labs video great guy on the forums Jim Sauer made a um a script with keyboard maestro that you press one one keyboard shortcut and it creates a um deep link to an Apple note. you know, it’s something we always struggle with. You can kind of do it. Apple gives you the tools to do it, but it’s really backwards. Uh, yeah, he wrote a keyboard Mac and he’s using Apple Script and a whole bunch of tools to do this. But he basically added a feature to Apple Notes where you can easily get a a link to your note with one keystroke.
And I’ll put a link to that into the notes as well, so you can go directly to it.

Sounds useful but I can’t find a link to it in the show notes. If anyone finds it please paste the link here.

I assume that the macro David is referring to creates a link like this one: applenotes:note/ec1c5e19-d5c3-4617-92xc-04313192d79e?ownerIdentifier=_72c318729c9a2bc7030f6b97a8c026a. The problem with these links however is that they are custom links, and as such you can’t paste them into Google Docs, Notion or Discourse forums. As I mentioned in another talk topic here with respect to a previous episode, that’s where Hookmark comes in, which lets you copy a universal link instead, one that would look like this: https://hookmark.net/hm/hook/notes/dt/1766626189, the ID is the date and time of the note. Because that’s an https:// link you can paste it in Google Docs, NOtion, and other places that do not accept custom links.

It’s a shame that web apps like Notion and Google Docs neuter custom links. Apple in contrast supports them in iCloud.com, but the universal link workaround solves the problem.


I’m just getting into Keyboard Maestro (after owning it for over a decade). This is a year of increased automation for me so I will refer to David’s Keyboard Maestro Field Guide which I owned from day one but haven’t read yet… (I design the Hookmark app which has a Script Editor, AppleScript and Shortcuts).

3 Likes

I’m also here for the same script.

Currently I’m using the share via messages method (which I learned from David) to get the link to a note. That’s where you start sharing via messages and stop, go back, and now copy link appears. Cumbersome but it works.

1 Like

Maybe this is the post by Jim Sauer

and reading a few posts below it, somebody posted a macro with an Apple Script

3 Likes

Maybe do Cmd-L then Cmd-C on Firefox?

Hi, @LucCogZest (and @Mpacker, @Topre). I hadn’t listened to this particular Mac Power Users episode (I’m a little behind!), but after you mentioned this topic, I listened to that segment.

I agree, I don’t think a link to the macro made it into the episode show notes.


This subject first came up in one of MacSparky’s Field Guides, specifically the Webinar Series – Notes episode of the Apple Productivity Suite Field Guide (Pro) course.

After I listened to that segment of the course, I sent David an email and suggested that he check out this macro that I had contributed on the Keyboard Maestro forum: Create Apple Note Link

Note that the above macro was the result of information I had obtained from others in the Keyboard Maestro forum thread.

David replied to my email, mentioned that he really liked the macro and mentioned that he planned to share it within a short video. He also asked about attribution. (If David has shared it, I’m not sure where it is located.)

More importantly (for some, I suspect), I replied to David’s message and shared some follow-up information. Here’s an excerpt:

Now that I think more about this subject, I recommend that you refer to a superset macro set named Copy as Markdown link contributed by @ComplexPoint.

The latest version of this macro set is available at: GitHub - RobTrew/copy-as-md-link: macOS Keyboard Maestro macro group – single keystroke to copy MD links from different applications.

Rob (@ComplexPoint) updates this macro set regularly and though the years has added link capability to additional apps often motivated by requests by forum users.

If my memory serves me correctly, after I shared the macro referenced below, I contacted Rob and suggested that he add Apple Notes capability to Copy as Markdown link.

(BTW, it may not be obvious, but Rob’s macro set can create links to Finder files and folders. This, of course, is handy to use within Apple Notes.)

One of the really cool features of this Copy as Markdown link is that it updates multiple flavors of the system clipboard so that the link can be pasted as: 1) a markdown link into text editors, or 2) a rich link into Mail, Pages, etc.


I hope that’s not too confusing. Feel free that ask if you have any follow-up questions.

3 Likes

thanks for following up, much appreciated ! Certainly shows the flexibility of Keyboard Maestro.

Do you know if his file links are robust like Hookmark’s hook://files links, meaning if you move or rename the file the link still works?

and does he have a way of linking, like Hookmark’s universal links that creates links that work in Notion, Google Docs and other web apps, i.e., does it wrap the custom link inside an https:// link? As far as I know that’s the only way to get around the problem of pasting custom links in vitiating web apps, which … includes discourse forums.

2 Likes

Conflict Palette users:

I just learned if you hold down option when clicking a macro, it opens to edit in KM! :exploding_head:

6 Likes

No, all links created by Copy as Markdown link this tool are static.

Links to Finder files and folders look something like this…

[1 PWL.png](file:///Users/u/Downloads/1%20PWL.png)

Advantage: no third-party tool required to access the file (or folder)

Disadvantage: if file (or folder) gets moved, the link is not updated

But for apps that reference items via UUID (i.e., Notes, Drafts, Keyboard Maestro, and many others) there is no move issue.

2 Likes