Problem with Scripts Created on Panther
Curtis Clifton
curt.clifton at mac.com
Sat Jan 17 21:25:35 PST 2004
Hi! I'm working on some OO scripting for the first time since
installing Panther. I had some difficulty to get the new scripts to
work from OO's Script menu. I think it is because Script Editor under
Panther saves scripts to the data fork, while previously scripts were
saved in the resource fork.
I had an old script, call it Script One, that just displays a simple
dialog box (contents of script attached). Script One runs fine from
the OO Script menu.
I did a Save As.. from Script Editor and made a duplicate of the script
with a new name, call it Script Two. Script Two does not work from the
OO Script menu.
I copied an old script using the Finder and named the copy Script
Three. I opened Script Three in Script Editor and changed the content.
Then I saved. Script Three runs fine from the OO Script menu.
Using the command 'ls -l' in Terminal, I discovered that Script One and
Script Three show a size of 0, because their contents are in the
resource fork. But Script Two, created by Panther's Script Editor,
shows a non-zero size, because its contents are in the data fork.
After a bit Googling, I discovered the command 'osacompile', a
command-ilne utility for compiling AppleScripts. The utility is in
/usr/bin on Panther and, by default, outputs the compiled script in the
resource fork. After compiling the troublesome script with osacompile,
it runs without a hitch from OO's script menu.
In summary:
- OO does not handling data-fork only scripts from its Script menu.
- Panther's Script Editor creates data-fork only scripts by default.
- Using osacompile from the Terminal is a work-around.
-- Curt
More information about the OmniOutliner-Users
mailing list