AppleScript Question

Michael Terry formido at mac.com
Mon Mar 17 21:41:01 PST 2003


On 3/17/03 7:14 PM, "Wayne Brissette" <waynefb at earthlink.net> wrote:

> I know I must be missing something. If I have an outline with 3 columns
> shouldn't I be able through AppleScript to say give me all the data
> that's in row 4 column 2 and row 4 column 3?
> 
> I can't quite seem to figure out the syntax for doing this...
> 
> Wayne


Well, below's a way to get the value from a cell, and you can call the
handler for as many cells as you need.


----------------------------------------------------------------------------

tell front document of application "OmniOutliner"
    my getCellValue(first row, "Topic")
end tell

on getCellValue(x, y)
    tell application "OmniOutliner"
        repeat with i in (get cells of x)
            if i's column's title is y then
                set n to i's value
                try
                    n
                on error
                    return i's text
                end try
                return n
            end if
        end repeat
    end tell
end getCellValue

----------------------------------------------------------------------------


Mike




More information about the OmniOutliner-Users mailing list