Problems with OO and Applescript

Ben Bornstein ben.bornstein at jpl.nasa.gov
Wed Mar 3 11:45:24 PST 2004


Hi All,

      I'm new to both OmniOutliner and Applescript (though I am a 
professional developer comfortable with many programming languages).  I 
wrote a simple Applescript to do some calculations across columns in a 
row and store the result in another column in that same row.  I've run 
into two problems:

        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?

        2.  My script only updates cells in rows without children (via 
'set
            value of cell [column num] of [row reference] to ...'), 
though a
            row may have a parent.  Unfortunately, for 'calculated 
summary'
            columns, OO doesn't update the summary information in the
            parent row.  Does this make sense?

            Am I doing something wrong?  Is there a command I can send 
to OO
            to trigger the parent summary cell to update?  Or is this a 
known
            bug / issue in OO?  If not, I can post a short example 
script that
            reproduces the problem (this message is long enough already).

      Finally, (maybe this is already possible?) it would be great if I 
could trap or listen to OO events to immediately update a calculated 
cell after another one has been edited.  Again, I'm new to Applescript, 
so I'm not sure if there's a notion of an 'always on' script to handle 
events or some sort of event handler registration mechanism.  Could 
someone enlighten me?

      Thanks.


Ben




More information about the OmniOutliner-Users mailing list