AppleScript access to other columns?
Adam Wuellner
adam.wuellner at gmail.com
Wed Aug 10 07:56:31 PDT 2005
On 8/8/05, Jim Miller <jmiller at miramontes.com> wrote:
> I've got a to-do list type outline that has a "Priority" column in
> it; this has pop-up list entries like "Today", "Tomorrow", and so
> on. I'd like to write a script that gets all the rows whose priority
> column is "today" (for instance), but I can't figure out how to get
> this other column data for the rows. Any suggestions?
This assumes that your Priority column is the first column
to the right of the Topic column (i.e. column 3):
tell front document of application "OmniOutliner Professional"
set some_rows to rows whose value of cell 3 is "today"
end tell
Here's a variation that will allow you to move the column at
your discretion without breaking the script:
tell front document of application "OmniOutliner Professional"
set column_index to index of first column whose name is "Priority"
set some_rows to rows whose value of cell column_index is "today"
end tell
Incidentally, if you don't know the possible values for the
popup column, you can ask for the names of its enumerations:
tell front document of application "OmniOutliner Professional"
set column_index to index of first column whose name is "Priority"
set popup_values to name of enumerations of column column_index
set some_rows to rows whose value of cell column_index ¬
is item 2 of popup_values
end tell
Hope that helps,
Adam W.
More information about the OmniOutliner-Users
mailing list