Photo Booth: Reveal In Finder

I’d like to create a quick macro for Photo Booth that triggers via a hotkey so that, when an image in Photo Booth is selected, the file is revealed in Finder.

In earlier versions of Mac OS (OS X), this used to be a built-in menu function, called “Reveal In Finder…” (⌘R), but it has since been rescinded.

The trouble with trying to recreate this as a KM macro is that it doesn’t seem possible to reference the selected image, nor is Photo Booth scriptable with Apple Script.

The really odd thing is that, in Alfred 3, the hotkey trigger allows you to pass the “Selection in MacOS” through a workflow (macro), which includes the selection in Photo Booth. I’m not sure what’s going on behind the scenes here, but it makes achieving the goal in Alfred very straight forward.

However, can it be done it KM ?

Hey @CJK,

I took a look with both Script Debugger and UI Browser.

Unfortunately I just learned that accessibility in Photo Booth is pretty bad…

-Chris

It’s odd that Apple either chose not to or neglected to enable Photo Booth access.

I wonder what method is used by Alfred. Maybe I should write to the programmers and ask them.

My goal can be achieved in KM using the Copy action, which copies an image reference to the clipboard. Then the action Reveal File can be used. It’s not ideal, because it’s not very elegant and you’re then left with a photo on the system clipboard (which appears to be the case even when copying to a named clipboard).

All operations with a Named Clipboard to through the System Clipboard.
But that's not an issue. After the operation, if you don't want it on the System Clipboard, just execute a Delete Past Clipboard action (KM Wiki) with a "0" Clipboard (the current System Clipboard).

Thanks for the tip. This does, of course, work. However, Alfred has a built-in clipboard history feature, and it stores the photo as well. I haven’t yet figured out how to erase an item from the Alfred clipboard history, but that’s beyond the remit of this forum.