PDA

View Full Version : Total number of rows?


Armanini
2007-06-14, 04:16 AM
Hi, is there a way to know the following in an OO file (I suppose the only way is via applescript):
- Total number of rows in the file (all levels included)
- Total number of rows of a given level (let's say I want to know how many rows there are in all Level 2s of my document, and I have a document with two Level 1 topics with 7 and 9 children respectively: the number I'm looking for would be 16, that is 7+9 rows in Level 2).

Here's my usage scenario: I'm in film studies and I'm transcribing films, shot by shot. I'm outlining the films in Acts/Sequences/Scenes/Shots and I'd like to know the total number of scenes and the total number of shots in the entire film.

Thanks!
Stefano

mjuengling
2007-06-17, 03:36 PM
A very simple idea: Ad a single column to your outline and go to the inspectors. There you can change the column to numbers and set the summary to total.
Now type in every new row a one (1) in the new column and OO will summarize for you.

Armanini
2007-06-19, 07:33 AM
That should do as a workaround only... But Orson Welles edited 4000+ different shots in Othello... in such a case this workaround wouldn't be enough. Does anybody know how to achieve this via applescript?
Stefano

DerekM
2007-06-19, 12:51 PM
actually, here's a quicker way to do it:



tell application "OmniOutliner Professional"
tell front document
set totalRows to length of (get rows)
set theLevel to text returned of (display dialog "Enter row level: " default answer "") as integer
set theCount to length of (get every row where level is equal to theLevel)
display dialog "Row total: " & totalRows & "
Level " & theLevel & " total: " & theCount

end tell
end tell