Silly Keyboard Maestro URL Creator

This is the world’s smallest KM script, and it is custom to my vault name, but it could be useful. The trick is KM’s ability to alter clipboard contents. I’m just running the percentage filter so it adds all the necessary code for spaces and symbols in the name.

5 Likes

Ah, clever. You first copy a given note name, then run this, yes?

Edit: PS: Added to the Using (and automating) Obsidian on macOS - Meta Post thread

Yes… Sorry for the thin explanation.

2 Likes

Great to see you here @MacSparky!

I’ve added a bunch of Rube Goldberg shenanigans to create an more automated approach that can be inserted in any app via a typed string (just as you use to do with your Mail.app links).

It requires setting a keyboard shortcut to the “Copy path to file” (mine is set to ⌃⇧P).

You will also need to change the path to your vault

Once this step is done you can activate the Macro and start typing ;oblink everywhere and have the Text Expansion powers of Keyboard Maestro replace that string with the proper Obsidian formatted URI link.

That Keyboard Maestro Macro can be downloaded here

The ability os Obsidian to allow for keyboard shortcut customization for nearly every command is a bless when paired with Keyboard Maestro.

UPDATED to reduce Keyboard Maestro steps and perfecting the AppleScript Core

UPDATED 2 found a way to script “System Events” to eliminate the need for the Keyboard Maestro Variable “App” and simplify yet more the AppleScript Core.

3 Likes

@ldebritto Nice looking script. Isn’t funny how anything you write in AppleScript needs a little later “perfection”. That sure is my experience too.

Yes, indeed! I’m only beginning to realize why you have all that love for System Events!

It’s keystroke commands combined with Obsidian’s ability to assign customized shortcuts to almost every function of the app makes it quite a deal!