Zettelkasten Forum


Keyboard Maestro Help Request - just UID from current file

So, I finally went for it and got Keyboard Maestro. All of the macros you all have published here have been immensely helpful, and are causing me to use The Archive more regularly than I had before, so I thank you all.

But now I'm trying to do a thing, and I am stuck. Can anyone help me with a macro that grabs to the clipboard_just_ the UID of the current file focused in The Archive? My use case is this: I frequently find myself creating files with a uid at the beginning of the filename, but then when I want to put that in a header or a back-link or metadata, I have to select it in the omnibar. I'd love to be able to hit a hotkey and just have it on the clipboard to paste wherever.

I have seen on here a bunch of examples of searching through the UIDs of an entire ZK, but I am stuck on how to reference the currently open file. Assume I am using a standard 12-digit uid, so a filename would be something like 201909232357 Great Idea.md and I just want 201909232357.

Thanks in advance!

Comments

  • One way.

    Copy Current UID

    Will Simpson
    My zettelkasten is for my ideas, not the ideas of others. I don’t want to waste my time tinkering with my ZK; I’d rather dive into the work itself. My peak cognition is behind me. One day soon, I will read my last book, write my last note, eat my last meal, and kiss my sweetie for the last time.
    kestrelcreek.com

  • Thanks @Will. I'm somewhat surprised there is no way for KM to deal with "currently open file in application" without having to go to the omnibar. But, this will work well enough. Thanks very much!

  • You could get there via AppleScript once The Archive exposes such functionality with 1.5 or 1.6, but not at the moment :(

    Author at Zettelkasten.de • https://christiantietze.de/

Sign In or Register to comment.