Friday, August 1, 2014

#1 2007-08-08 03:56:33 pm

Kevin Bradley
Administrator
From: Independence, MO
Registered: 2006-03-13
Posts: 548
Website

Can I create a droplet in AppleScript Studio?

Adding `on open` Support to an Existing Studio Application

If you create an AppleScript Studio application with Xcode's default "AppleScript Application" template, then your application will not have "droplet" support (i.e. passing dropped items to the `on open` handler) like it would if you started with the "AppleScript Droplet" template.

As far as droplets go, the difference between those two templates is that the "AppleScript Droplet" already has the Info.plist file configured correctly. (Side note: When using Script Editor, this information is already added when saving an application that has an `on open` handler.)

<key>CFBundleDocumentTypes</key>
<array>
    <dict>
        <key>CFBundleTypeExtensions</key>
        <array>
            <string>****</string>
        </array>
        <key>CFBundleTypeName</key>
        <string>DocumentType</string>
        <key>CFBundleTypeOSTypes</key>
        <array>
            <string>****</string>
        </array>
        <key>CFBundleTypeRole</key>
        <string>Editor</string>
    </dict>
</array>

To add this information with Xcode, choose the Project menu, then choose Edit Active Target. In the resulting window, look for a Document Types table (this is under properties in Xcode 2.4.1) and add a type with these settings (screenshot):

* Extensions: "****"
* OS Types:   "****"
* Store Type: Binary
* Role:       Editor
* Package:    selected

Contributed by Bruce Phillips


Nitewing '98
--
I distrust morning people, largely because I suspect them of getting together early one day while the rest of us were asleep and setting up the rules of civilization.

Offline

 

#2 2005-10-11 03:15:34 pm

julifos
Administrator
From: MalasaƱa, Madrid
Registered: 2002-11-20
Posts: 2014

Re: Can I create a droplet in AppleScript Studio?

Yes, you can create AppleScript Studio application that can process dropped files.  Apple has actually included a template for creating a droplet application with AppleScript Studio.

To build a droplet, choose "New Project" from the "File" menu in "Project Builder".  Next, select "AppleScript Droplet" from the list provided.

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.019 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)