Problem with Scripts Created on Panther

James Moore jam at omnigroup.com
Tue Jan 20 10:22:13 PST 2004


Interesting, I don't think any of us here were aware that using 
osacompile would produce a usable script. ( I certainly wasn't) The 
scripts are working fine in our OO3 alpha builds so whatever the bug is 
appears to have been fixed.

-James

Technical Support Engineer
Omni Group


On Jan 17, 2004, at 9:25 PM, Curtis Clifton wrote:

> 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
>
> _______________________________________________
> OmniOutliner-Users mailing list
> OmniOutliner-Users at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/omnioutliner-users




More information about the OmniOutliner-Users mailing list