Capture path the Save As dialog is showing

I have a ScanSnap scanner that scans in documents, auto opens up ABBY FineReader for ScanSnap, does OCR and then presents me with a dialog box, asking where I want to save the file.

I have a Keyboard Maestro macro that auto launches and I have it asking me some basic data entry questions and it has 5 buttons I can click on. 4 of the buttons allow me to change where the file will be saved and the 5th button is the default, to save where it ‘Thinks’ I last saved the a file using this macro. The problem is the directory may have changed since the Macro was last run and the actual save as location is not where the macro last saved a file.

Is there a way, perhaps with Applescript, to capture the directory path of where the Save As dialog box is at? If I could capture this, I could compare it to where Keyboard Maestro Macro thinks I last saved it and if it is different the macro could make the correction.

I know the Mac OS or each App keeps track of the current path the user last saved or opened something. I just don’t know how to capture that path to use it in a macro.

Hey Stephen,

There’s no good way to do this unless you have Default Folder.

Default Folder exposes the current location of dialog boxes to AppleScript via GetCurrentFolder.


You’re talking about this, right?

Is it worth the price? (Not that it’s expensive, just… is it worth it?)

IMO, yes! Definitely worth it. I’ve been using DefaultFolderX for years, and couldn’t do without it.


Hey Dan,

I’ve been using it for so long that I don’t remember when v1.0 came out.

I don’t keep things running on my system, unless I find them very useful.

My staples are:

Default Folder
iStat Menus
Keyboard Maestro
Little Snitch
MercuryMover # Nearing its end-of-life.

Default Folder has been in use the longest (since 1994).

There’s a demo – try it out for yourself.  :smile:


1 Like

A quick update. Default Folder, through the prefs, does only 1/2 of what I needed so I reached out to the developer. They quickly responded and told me I could use AppleScript to control Default Folder to do the rest of what I needed. Great support!

Though I try to limit how many utilities I add to my operating system, it sounds like Default Folder might be a good one to have.

Thanks for pointing me in this direction.