Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Old AppleScript applications stopped working



On Aug 26, 2007, at 12:22 PM, Doug McNutt wrote:

Apparently those AppleScript apps are true, single file, executables in the UNIX sense. The command lines:

cd $HOME/bin
./CleanUp.app

execute a Compiled script just fine.

Strictlty speaking, you're running an AppleScript applet, which is definitely not the same thing as a compiled script.


FE ED FA CE are the first 32 bits of the AppleScript app and I'm fairly sure that they stay the same. Is that some kind of #! line that applies to Finder? Does Finder recognize it and fork the "app" as though it were a simple executable in BSD UNIX? Why does Finder insist on the execute bit? It totally ignores those bits in the file info window.

The "0xfeedface" header is Mach-O magic. It's not really the Finder recognizing it, it's a lower level of the system.


And more to the point. . . Can I add the phunny shebang sequence to the result of a compiled block of code and thereby persuade Finder to execute it on a double click? An automatic "do shell script"?

Go read the first few paragraphs of "man 2 execve". Short answer: probably no, but it depends on exactly what you mean by "compiled" and "code".


Finder will already launch anything with its executable bit set. (At least, Tiger will. Not sure about anything earlier.) It will even open a Terminal session to run it in if it decides that it's necessary, though I don't know what criteria it uses.


--Chris Nebel AppleScript Engineering

_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden
References: 
 >Re: Old AppleScript applications stopped working (From: Ed Stockly <email@hidden>)
 >Re: Old AppleScript applications stopped working (From: Doug McNutt <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.