Retrieve finder tags

I want to create a macro that allows me to quickly paste the name of a finder tag into the search field.

Is it possible, via some kind of script, to gather the list of finder tags (which will always be updated in real time) and set them as a list so then I can click one of them with the mouse (or using the up/down arrows and hitting Enter) to paste that tag where the cursor is?

I found this applescript that creates the list, which is a good first step:

Now how to convert that list into a KM list that can be triggered by a shortcut and then display that list similar to the Execute Macro by Name so then I can mouse click or hit enter on the selected item list?

I also found this other thread, if it's somehow useful:
https://discussions.apple.com/thread/252540260

This might get you started -- should be easy enough to get from the System Clipboard to wherever you need the selection. Note that it allows multi-selection so you should process multiple lines down to one, using whatever separator your destination requires.

Caveat -- it does depend on the PlistBuddy command line utility, and I can't remember if that's still included in Monterey (and my test machine's out on loan :frowning: )

Tags Test.kmmacros (3.4 KB)

Image

1 Like

This is something similar, in a sense, to what @Nige_S posted. It's from a solution I posted, for a user, last year. If anything, it gives you an additional option or something to think about.

2 Likes

@Nige_S Thank you! This is pretty close to what I'm looking for! :slight_smile:
Is there a way to add a Pause Until action right after the Prompt that waits until the prompt is gone, before running the last action? In my case I will have a Paste action instead of the Display Text, but I want to make sure the Prompt is 100% gone to avoid glitches

Thank you

Thank you for sharing. @Nige_S solution seems to be what I'm looking for. I just need an extra tweak and I'm good to go :slight_smile:

1 Like