Droplet app no longer lets files drop on it

Has anyone experienced this problem, and does anyone know of a solution?

I have a few AppleScript apps that are droplets that, unpredictably, stop acting as droplets - that is, if I drag a file on top of them, they don’t get highlighted, and I can’t drop a file on them at all. The “dropped” file simply gets moved to the same folder.

They used to work perfectly as droplets, but suddenly they stop working. I use perfectly standard code, like this:

on open theDrop
	repeat with dropFile in theDrop
	tell application "Finder" to set dropName to the name of dropFile
	tell application "Finder" to set dropExt to the name extension of dropFile
        ... etc., etc.

Sometimes I can get the droplet function to work by creating a new ApplesScript app from the same code. But that doesn’t always work.

Does anyone have any suggestions for fixing or preventing this? Thanks for any help.

I have had the same problems other places.

I think your droplet may time out before Finder gets around to do something about the files. That is at least what I have guessed is happening. I am not totally sure, as I have never come around to really do something about it, but Applescript has a timeout by default of 2 seconds, which isn’t terribly long. maybe if you try to insert a timeout clause, then you’ll at least know for sure.

No, it’s two minutes. And it only applies to Apple events sent to other applications.

Thanks for the page refresh Shane! :slight_smile:

I have a droplet that sits in the Finder toolbar, that opens a Terminal tab based on the item. The droplet is supposed to die. Sometimes it doesn’t, nor do I get a new Terminal tab, so I suppose that what happens is that Terminal.app is never gets a round to replying to the event.

And I haven’t fixed this, because I have started to use iTerm2 in the mean time. Much better!

Thanks for these comments. It’s still a baffling problem. I was able to solve it this time by building the entire application bundle again. I saved the script in TextEdit, then copied it back into the editor, then added all the files again, and got it the new application to work as a droplet. But it would be nice to know what caused it in the first place!