Drag and Drop Errors

Nice! Works great except for the fact that it doesn’t show the UTI it shows “com.apple.application-bundle” while the UTI should be something like “com.apple.automator” Thanks rdemar!

You can get the id if get the path to the app. Try:

set theUTI to id of application (theURL's |path|()) as text

Or, try adding these lines to your performDragOperation method:

set theBundle to current application's NSBundle's bundleWithURL_(theURL)
            log theBundle's bundleIdentifier()

I think this will give you something closer to what you want.

Ric

Thanks guys, I had a error when trying Shane’s method (I got this error: Can’t make id of application («class ocid» id «data kptr00000000A0B0360002000000») of «script» into type text. (error -1700)) But I had no trouble with using bundleIdentifier(). Thanks guys! This was the last part of my project, now it’s just the fun part, Icons and Naming!

It probably needed extra parentheses:

set theUTI to id of application ((theURL's |path|()) as text)

That worked – but you only need the outer set of parentheses.

Ric

Thanks, Ric. The more I think about it, the more the NSBundle approach looks more robust.