Settings dialog for Enhanced Applets

Is it possible to enhance the Applets with a Preferences menu item or button to open a preferences dialog (maybe built with Dialog Toolkit)?

Should be. You just need a handler that will show the prefs window, then make it the action of a new Preferences menu item. Something like this:

set appMenu to (current application's NSApp's mainMenu()'s itemAtIndex:0)'s submenu()
set newItem to current application's NSMenuItem's alloc()'s initWithTitle:"Preferences…" action:"showPrefs:" keyEquivalent:""
newItem's setTarget:me
appMenu's insertItem:newItem atIndex:2


on showPrefs:sender

The tricky thing is to stop it from being added to Script Debugger’s menu when testing. You need to add some test, checking path to me or the name of current application, or something.

Thanks, Shane.

I’ll try that. How do I avoid that the Enhanced Applet starts the progress when I add a command to the run handler? The script seems only to wait for dragged items when the run handler is empty.

I fear you’re snookered. I guess you could use an appletFileIsAcceptable handler to add it after the first file is dropped. You might want to make a feature request.