Wednesday, December 13, 2017

#1 2016-07-13 02:43:47 pm

tneison
Member
Registered: 2015-04-03
Posts: 66

Receive notification every time a save dialog appears

I have an applet that helps the user format the naming of files when downloading something or saving a new document. It is designed to work in conjunction with a save dialog window so that it effectively takes the place of the save dialog's text field. The user inputs text into my applet, the applet formats it and pastes it into the save dialog text field and keystrokes return to save it.

Everything works perfectly except that the user must manually launch the app each time a save dialog appears. I tried using Apple's FinderSync API. It is designed to allow developers to safely modify Finder's appearance, but I was also able to (mis)use it to send tell application "NamingHelper" to activate each time a new FinderSync instance is created. I works intermittently since save dialogs use an instance of Finder, but it is too unreliable, clunky, and possibly unsafe to consider a working solution.

I was hoping someone knew of a better way to do it. Any ideas?


Filed under: asoc, FinderSync, save dialog

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)