Application and Droplet using AppleScript Studio

I have successfully developed a combined application and droplet using Script Editor using on run and on open handlers. Within the on run handler, I use display dialog to remind the user that it’s really a drag and drop application.

However, it appears that Applescript Studio requires choosing one or the other, not having both simultaneously. I have the following handlers:

on launched theObject
on open theFiles
on will quit theObject

Within the on launched handler I use the same display dialog reminder. So far so good, but when I try to drag and drop a file on the built application, the app does not highlight meaning that somehow it does not recognize itself as a drag and drop application via my on open handler.

Any ideas?

Hi John,

to see, what’s necessary for a droplet, you can create a new AppleScript Droplet project in Xcode

Stephan:

When I create a droplet, Applescript Studio creates empty on open and on idle handlers and that’s all.

Further, unlike the double-clickable app version of Studio, even though I do have a Window in my droplet project, no window shows … I call display dialog attached to this window, but no window shows. So whatever hidden code in the double-clickable app shows this window successfully, that hidden code is apparently not present in the built droplet project.

/signed/ very confused.

programming AppleScript Studio is quite different from plain AppleScript

To show a window either check “Visible at launch time” in NSWindow Inspector of Interface builder or
use a awake from nib or will finish launching handler adding the line

show window "myWindow" 

.
All Interface elements must be properly connected to the script

There’s more to your application that the script file.

http://bbs.applescript.net/viewtopic.php?id=16550

Does this help?

Moving to AppleScript Studio…

Found my answer on how to add a droplet capability to a double-clickable app … lots of cheers for jobu

http://bbs.applescript.net/viewtopic.php?id=19175

and thanks StephanK for “To show a window either check “Visible at launch time” in NSWindow Inspector of Interface builder”

For future reference: Adding on open Support to an Existing Studio Application