Fwd: Problems with OO and Applescript
Curtis Clifton
curt.clifton at mac.com
Wed Mar 3 12:50:59 PST 2004
Just realized I sent the following to Ben and not to the list. Thought
the summary would be useful for posterity:
Begin forwarded message:
> From: Curtis Clifton <curt.clifton at mac.com>
> Date: March 3, 2004 2:14:35 PM CST
> To: Ben Bornstein <ben.bornstein at jpl.nasa.gov>
> Subject: Re: Problems with OO and Applescript
>
> Ben,
>
> On Mar 3, 2004, at 1:45 PM, Ben Bornstein wrote:
>
>> 1. The script runs fine when I run it from either the Script
>> Editor
>> (by pushing the 'Run' (Play) button) or the Finder
>> AppleScript
>> menu. However, I can't seem to run it from the 'Scripts'
>> menu
>> within OO.
>>
>> The reason I don't think it's running at all is I've
>> inserted a
>> debug 'say "Hello, World!"' statement and I hear no sound.
>> The
>> strange thing is I can edit (to slightly modify) example OO
>> scripts
>> I've downloaded (installed under my home directory) and run
>> them
>> from within OO and see (hear) the results.
>>
>> My script starts out with a block like this:
>>
>> tell application "OmniOutliner"
>> tell front document
>>
>> I've also tried 'tell front document of application
>> "OmniOutliner"'
>> and enclosing the above blocks in an 'on run' block as in
>> the
>> 'Export to iCal' example script. None of these things seem
>> to
>> make any difference.
>>
>> Finally, I don't see any warnings or errors in any of the
>> system
>> logs (does Applescript log somewhere?). I'm running OO
>> 2.2.6
>> (v69.6), AppleScript 1.9.3 and MacOS X 10.3.2.
>>
>> Am I missing something obvious? Does anyone have any
>> suggestions?
>
> Script Editor changed in Panther to place the compiled code for newly
> created scripts in the data fork of the script instead of in the
> resource fork. Scripts run from the OO scripts menu only work if the
> compiled code is in the resource fork. There are a few alternatives:
>
> - Save your script as text and compile it from the command line using
> osacompile. (Try 'man osacompile' for info.)
>
> - Find a script that works in OO. Copy the script using the Finder
> (to preserve the resource fork) and rename it to the name you want for
> your script. Open the copy in Script Editor and paste your code into
> the editor. Since the compiled code is already stored in the resource
> fork, Script Editor will put the compiled code for your script in the
> resource fork also.
>
> - Use a different script editor. Smile from Satimage has been
> recommended to me, but I haven't used it yet.
> http://www.satimage.fr/software/en/softx.html
>
> - I think that scripts for OO compiled with the new Script Editor will
> work from the script menu extra. Another advantage of this approach
> is that the menu extra shows the scripts immediately, as opposed to
> the significant lag for OO to populate its own Script menu.
>
> Others will have to chime in on your other questions...
>
> Cheers,
>
> -- Curt
>
> ** Integrate OmniOutliner on your Mac with ShadowPlan on your Palm OS
> device. **
> http://www.cs.iastate.edu/~cclifton/software.shtml
>
More information about the OmniOutliner-Users
mailing list