Thread: OO Pro 4.0?
View Single Post
OK, I finally got it. Here it is:

tell application "OmniOutliner Professional"
tell front document
set TodaysDate to current date
set time of TodaysDate to 86399 -- one second before midnight
set sorting postponed to true
repeat with theRow in every row
if (count children of theRow) = 0 then
set theTopic to value of cell "Topic" of theRow
set theDate to value of cell "Date" of theRow
if TodaysDate > theDate then
set time of theDate to 86399
set theNewRow to make new row at end of rows of (first child whose topic begins with "Today!") with properties {topic:theTopic}
set value of cell "Date" of theNewRow to theDate
end if
end if
end repeat
set sorting postponed to false
end tell
end tell