Applescript droplet works fine on one machine, does nothing on another.


This droplet (with a "display dialog" added for debugging purposes) works just fine on my new Mac Mini, but does nothing on my colleague's MacBook Pro, other than maybe make the dock quiver slightly (it doesn't even show the dialog!):

on open foo
	repeat with bar in foo
		set {tid, AppleScript's text item delimiters} to {AppleScript's text item delimiters, ":"}
		set baz to text items of (bar as string)
		set AppleScript's text item delimiters to "/"
		set qux to baz as text
		set AppleScript's text item delimiters to tid
		display dialog "java -jar /Applications/Emulator/EmulatorLauncher.jar \"/Applications/Emulator/emulator.jar\" \"/Volumes/" & qux & "\""
		do shell script "java -jar /Applications/Emulator/EmulatorLauncher.jar \"/Applications/Emulator/emulator.jar\" \"/Volumes/" & qux & "\""
	end repeat
end open
I'm on Mountain Lion (10.8.1); he's also on Mountain Lion (10.8.2); the droplet was originally generated by AppleScript Editor on (probably) a somewhat older OS release, and up until today, I hadn't done anything since the original version (that WAS working on his MacBook) other than tweak the Info.plist:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
		<string>56 124 602 597 0 0 1680 1028 </string>
		<string>event log</string>


Your script mentions java.
Java is not a default install in OS X, so you may have different versions of java installed (or not installed at all)

You can go to this page to see what java version is reported by your browser -
A recent version of java will also have a settings pane in your System Preferences - if you have it installed.
You can open that pane, and check that java is up to date - or at least the same version active on both of your Macs.


We're a software company, and every box in the building has Java.

On the "problem" MacBook, the script doesn't even get as far as displaying the dialog I added for debugging purposes.

Yet if I type the command line being fed to the "do shell script" (or displayed in the dialog) into a terminal window on the "problem" MacBook, it works perfectly.


I've now run a couple of test AppleScript apps (not droplets) on my colleague's computer.

A script app successfully opened a dialog with a test message.

And a script app successfully opened a hard-coded version of the "do shell script" in the failing droplet.

So it's fairly clear that the droplet processing is what's failing.

Here is something interesting: If I drop the document (a terminal emulation definition) into the droplet (which launches a terminal emulation session using emulator.jar and EmulatorLauncher.jar) where it resides, about 4 folders deep on a network drive, it works perfectly. If I drop the same document into the local copy of the droplet, I get nothing but a brief quiver of the dock.

I brought up the Console, and tried it again. When it failed, I got this message:

12/14/12 2:48:02.895 PM[133]: ([0x0-0xc4ec4e][19558]) Job failed to exec(3) for weird reason: 13

EmuScript is the original name of the script that launches the emulation session, and it's still called that in the Info.plist. But within the droplet's inner structure, it's called "Contents/Resources/Scripts/main.scpt"

Helloa, what's this? "Weird reason 13" = authority issue! "chmod a+x" Interesting! That was it!
Last edited: