In some Mac applications there is the menu item or contextual menu item "Show in Finder".
I was wondering if it would be possible to use Keyboard Maestro to do a similar task for an open file in any application.
For example if a saved file is open in Preview I would like a Keyboard Maestro hot key shortcut to open Finder and highlight the actual file.
I know I can do this by right clicking at the top of the window's bar, on the file icon and then navigate to the file in finder. But I would like to be able to achieve the same thing with a hot key and ideally in any application, not just Preview.
I've tried a few approaches but I'm not getting anywhere.
I have managed to make this macro, which works in Preview.
It used the "mouse click at found image" to open the menu and navigate to the enclosing folder. But it only works in Preview - because the found image is a Preview icon. And it doesn't feel like a very elegant solution as I would have to make a new macro for each application.
Thank you - I am trying the first macro in that thread now. I just changed the bit I highlighted in red, to reveal the file in finder rather than showing its path. I will try with a few apps. Thanks again.
Hiya! This works wonderfully well, and it opens the path in finder. However, it would be very helpful if it could not only open the path bit highlight the relevant file, possibly even moving the mouse to that given location. Is that possible?
Since the original thread of 2018, Keyboard Maestro has a new token %FrontDocumentPath% which contains the full path to the frontmost open document in the active App. So, the original Macro can be reduced to one Action:
Well, the Action Reveal Filedoes already highlight the file in Finder. To move the mouse cursor to that position you could use the Move Mouse to Center of Found Image Action using a bit of the Finder blue highlight colour (you might need to screenshot the square of blue on your own system if the below example doesn't work).