I would like to create a macro that would let me press a key to set the current location of an open/save dialog screen to the frontmost Finder window. Bonus points for tips on a macro that can set the location of the open/save dialog to the second frontmost Finder window, and so on.
I realize that I can just drag the little folder icon of a given finder window into an open/save dialog, but that involves a LOT of clicking and dragging as you have to be able to see both the finder window and the open/save dialog at the same time. This can be particularly hard on a 11" screen. If such a macro could be built, it would save a lot of time and mousing over the course of the day.
I also realize that somewhat similar functionality is available in DefaultFolderX. However, there's still a lot of mousing (must find the window and command-click on it).
On a related note - it it possible to create a macro group that is only active when a file open/save dialog is open?
This is really great - your macro does EXACTLY what I wanted. I used the latest version, which uses paste text rather than type as text. I am also able to get away with an 0.1 second pause rather than an 0.5 second pause. Saves literally hundreds of milliseconds.
In all seriousness, this shortcut is much, much snappier than command-clicking on a folder with DefaultFolder X. Opening and saving files is much, much more reponsive since I don't need to have DefaultFolderX running anymore (due to this new macro) so it doesn't have to draw all of the Default Folder X graphics, which took over a second each time such a dialog opened.
My link from above is not pointing to my macro, it was meant to point to @peternlewisās macro, more precisely it is pointing to the topic Peter has started. (My macro is the one in the follow-up post. But I would recommend to use Peterās original macro, unless you need the additional functionality of my macro.)
But, no matter which macro you are currently using, glad I could help.
I did find @peternlewis's topic, so I got to see a few different approaches to solving this problem. I liked the paste text approach rather than type text. Faster!
Thanks again for your response to my question. This is really a great macro for me to have working on my machine.
Whether inserting text by typing or pasting, is not necessarily an issue. Just try to switch the corresponding action to āinsert by pastingā instead of āinsert by typingā and see if it still works.
The main difference between Peterās original macro and my follow-up variant is that my variant also lets you select a previous (recent) frontmost Finder window. But you donāt have to; if you just hit Return youāll get the currently frontmost window just as fine.
On the other hand, Iām not sure if my macro still works with the current KM8. Thatās why I recommended to use Peterās original macro, which is way more simpler and robust.
I will test it tomorrow.
PS:
Personally I donāt use any of the two macros, because Iām perfectly fine with Default Folder Xās ā-Click on a window
PS #2:
To answer your other question:
On a related note - it it possible to create a macro group that is only active when a file open/save dialog is open?
I donāt think so. But you could create a condition (via an action) that checks if for example an āOpenā or āSaveā button is present. But, depending on the trigger, this could be pretty resource-intensive (since it has to respond always), so I wouldnāt do it.