Make Droplet which acts on custom file types


#1

Hi there,

is it possible to create a droplet that will be launched when I double click onto my own file types like “File.droptxt” and “File.droprtf”. I also want new Icons for those file types. I know, that I can edit which file extensions a droplet accepts, but how to tell that my droplet will be the default app for opening my files?

Thanks for helping out.

Tekl


(Shane Stanley) #2

If you add an extension in Script Debugger’s Resources panel, you can subsequently edit the app’s Info.plist file to change its CFBundleTypeRole from Viewer to Editor. That might be enough. Be careful, though, that no other app uses the same extension.

For icons, it’s considerably more complicated, and probably not something you’d want to attempt with a standard applet. This should give you some idea of what’s involved:

https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_declare/understand_utis_declare.html

For standard apps, Xcode provides an interface for setting all this stuff.


#3

Thanks a lot. That was the missing information. :wink: