The Omni Group Forums

The Omni Group Forums (http://forums.omnigroup.com/index.php)
-   OmniOutliner 3 for Mac (http://forums.omnigroup.com/forumdisplay.php?f=9)
-   -   Word Count Revisited (http://forums.omnigroup.com/showthread.php?t=10664)

Patrick J 2008-11-21 05:57 AM

Word Count Revisited
 
Hi

I confess I last posted here about word count on 6th August.

[URL="http://forums.omnigroup.com/showthread.php?t=9253"]http://forums.omnigroup.com/showthread.php?t=9253[/URL]

I'm trying not to become the word count moaner of the OmniOutliner forums.

The word count implementation could be immensely cool if it were possible.

Other outliners, like Opal (formerly Acta) produce a single figure for the whole document, which is very much better than nothing. However what would be great would be a word count that could give figures for sections of the document.

In that last post I wrote about the idea a special word count column, giving the count for the main editing column in OmniOutliner and a summary at the top.

I don't know how doable that would be, but it would be great if possible.

Another approach would be to have the word count as a style. In this the default for the word count style would be "on" for everything but the user could apply the word count "off" style to any chosen elements. It would be applied just like any other style.

Being able to specify, for example, that column 2 would not be included in the word count would be great because I normally have a notes column to the right of the main editing column. This is a bit like the "comments" in a word processor.

So what I'm suggesting is that there are two superb user interface paradigms in OmniOutliner already in place to create a truly outstanding word count feature.

P.S. I'm delighted by OmniFocus 1.5. I'm going to cross off the "post to OmniOutliner forum about word count" item now :)

JKT 2008-11-21 10:07 AM

Just so that no one else is tempted... I was about to post that you can get statistics like this system wide using WordService from DEVONtechnologies, but I noticed in your original post that it isn't working very well for you in OmniOutliner... so back to square one ;)

DerekM 2008-11-21 10:46 AM

Please make sure to send this an email to [email]omnioutliner@omnigroup.com[/email] requesting this if you haven't before. While we do try to read everything on the forums, it's harder for us to document requests from the forums.

Patrick J 2008-11-22 08:15 AM

Thank you
 
[QUOTE=DerekM;51359]Please make sure to send this an email to [email]omnioutliner@omnigroup.com[/email][/QUOTE]

Hi Derek

Thank you for your post. I will send the email.

RobTrew 2008-11-22 12:45 PM

One can of course get a rough word count (without any great speed) through the Applescript interface ...

A workable hack for some purposes.

(some variant of the following)

[CODE]tell application "OmniOutliner Professional"
set intWords to 0

tell front document
repeat with oRow in rows
repeat with oCell in cells of oRow
if type of column of oCell is rich text then
repeat with oText in text of oCell
set intWords to intWords + (count of words of oText)
end repeat
end if
end repeat
end repeat
end tell

display dialog (intWords as string) & " words"
end tell[/CODE]

aglekis 2008-11-24 01:32 PM

Thanks Rob, it works great.
How can I do if I want to use quite the same script to count characters ? I'm not so familiar with apple script now !

RobTrew 2008-11-24 01:56 PM

Something like this ?

[CODE]tell application "OmniOutliner Professional"
set intChars to 0

tell front document
repeat with oRow in rows
repeat with oCell in cells of oRow
if type of column of oCell is rich text then
repeat with oText in text of oCell
set intChars to intChars + (count of characters of oText)
end repeat
end if
end repeat
end repeat
end tell

display dialog (intChars as string) & " characters"
end tell[/CODE]

aglekis 2008-11-24 10:01 PM

Perfect ! Thanks again.

whpalmer4 2008-11-27 08:59 PM

Have others managed to get these scripts to work successfully? When I run them with OO Pro 3.7.2 on 10.4.11 the "count of words of oText" construct always returns 0.

RobTrew 2008-11-28 01:42 AM

Both working fine with my files under OS X 10.5.5 and OO 3.7.2

How are you running them ?


All times are GMT -8. The time now is 11:27 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.