Re: Old AppleScript applications stopped working
Re: Old AppleScript applications stopped working
- Subject: Re: Old AppleScript applications stopped working
- From: Christopher Nebel <email@hidden>
- Date: Sun, 26 Aug 2007 13:11:07 -0700
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:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden