Page 1 of 2

[Solved+Issue] 'Live' Word Counter?

PostPosted: Mon Jun 15, 2009 2:18 am
by sheryld
I am doing an essay that has to be 500 words or more. My question is "Is there any kind of a counter that I can use while I am typing on my document, to help keep track of where I am?

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply. (TheGurkha, Moderator)

Re: COUNTER

PostPosted: Mon Jun 15, 2009 3:35 am
by acknak
Sorry, no; not a "live" counter.

Tools > Word Count is about the best you can do.

Re: COUNTER

PostPosted: Mon Jun 15, 2009 6:54 am
by Villeroy
http://yawar.blogspot.com/2006/05/live- ... t-for.html
Store the file with Unix line feeds in a directory Script/python/ of your user profile.
If Windows is your operating system then you can use Writer like this to install the script properly:
Copy all the code into a new Writer document and don't change anything.
menu:File>SaveAs...
- Type: Text (encoded)
- "Automatic file name extension" = OFF
- "Edit filter settings" = ON
- Directory: C:\Documents and Settings\<user name>\Application Data\OpenOffice.org2\user\Script\python [add the python directory to the existing directory Script if required]
- File name: WordCount.py
- Confirm what you are doing and choose "LF" when asked for the type of line feed.
Make shure that you check the option for automatic file name extension again, next time you store something else.

For casual use call menu:Tools>Macros>Run...MyMacros>User>WordCount>WordCount
In menu:Tools>Customize... you find ways to assign the macro to a shortcut, button or menu entry.

It pops up a little window where you type in the required count of Words. The tool shows the word count together with percents of the target value while you type.

 Edit: Just noticed a direct link to the file named wc.py with Unix line feeds and everything.
Download and copy to C:\Documents and Settings\<user name>\Application Data\OpenOffice.org2\user\Script\python [add the python directory to the existing directory Script if required] 

Re: 'Live' Word Counter?

PostPosted: Mon Jun 15, 2009 11:15 am
by franx
Hi,

... you might also have a look at →
EuroOffice My Progress
(... for more complex documents ...)

Re: 'Live' Word Counter?

PostPosted: Mon Jun 15, 2009 11:33 am
by TheGurkha
I've seen a fair number of posts here about people having difficulty with EuroOffice extensions and OpenOffice. Especially to do with trying to remove them again when they don't work. If you are going to try this extension, then it would be prudent to try it on an installation that isn't critical to you.

Re: 'Live' Word Counter?

PostPosted: Mon Jun 15, 2009 3:59 pm
by franx
Hi,
TheGurkha wrote:I've seen a fair number of posts here about people having difficulty with EuroOffice extensions and OpenOffice. Especially to do with trying to remove them again when they don't work. [...]


... you are right - there are some difficulties to remove EuroOffice My Progress.
But it will be successfully uninstalled at last.

Now, after the third installing/testing/removing, I arrived at the decision to keep the extension ... ;)

my_progress_3.jpg

Re: 'Live' Word Counter?

PostPosted: Tue Jun 16, 2009 2:45 pm
by Dingo-Dog
sheryld wrote:I am doing an essay that has to be 500 words or more. My question is "Is there any kind of a counter that I can use while I am typing on my document, to help keep track of where I am?

Title Edited. A descriptive title for posts helps others who are searching for solutions and increases the chances of a reply. (TheGurkha, Moderator)

O Yeah, All is possible!

you can live count your words with this OpenOffice macro

1800MS_IL.2.stw
Iannz OpenOffice.org page 1800MS_IL.2.stw. A template that I am working on
for displaying the ViewCursor's current location in the status bar. This
file is for testing purposes only! ...

http://homepages.paradise.net.nz/hillview/OOo/

Re: 'Live' Word Counter?

PostPosted: Fri Sep 10, 2010 3:08 am
by yawar
Hi,

For any future readers of this topic, I wanted to put up some new info about the Live Word Count script--I'm the author and I've created a nice new home for it at http://bitbucket.org/yawaramin/oo.o-live-word-count/wiki/Home. I've tried to make it as friendly as possible with download and install instructions. I hope people searching for word count solutions in OO.o Writer decide to pay a visit.

TheGurkha wrote:I've seen a fair number of posts here about people having difficulty with EuroOffice extensions and OpenOffice. Especially to do with trying to remove them again when they don't work. If you are going to try this extension, then it would be prudent to try it on an installation that isn't critical to you.


If you do try Live Word Count, it's very simple to remove it: simply delete the wc.py file from the Scripts folder (discussed in the install instructions) and that's it.

Cheers,

Yawar

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 5:58 pm
by LoneWolffe
This is an old thread, I know, but is there any chance someone can help me installing the referred wc.py on OpenOffice 4? I followed the same installation instructions, more or less, as for OO3 here…http://www.techradar.com/news/software/applications/12-handy-openoffice-writer-tips-954562, but I only see a "wc" folder in the Macro Selector, and no "WordCount" macro in the "Macro Name" box. :?:

Fullscreen capture 2252014 105449 AM-001.jpg


I copied wc.py to C:\Users\LoneWolffe\AppData\Roaming\OpenOffice\4\user\Scripts\python, but I guess that the script is incompatible? :(

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 6:23 pm
by Greengiant224
LoneWolf:

Have you tried clicking on the 'WC' folder in the python macro dialog box?
You should then see the wc.py script.
Clicking on 'run' will execute the said script.

Your path to the users python scripts folder looks correct.

Greengiant224

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 7:01 pm
by LoneWolffe
Yes, I tried clicking on the wc folder, but nothing shows up on the right-hand box under "Macro Name"
Fullscreen capture 2252014 115844 AM.bmp.jpg

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 7:30 pm
by Greengiant224
LoneWolfe,
What you are displaying is the standard basic macro dialog box.

You need to go to Tools>>Macros>>Organise Macros>> then select python from the bottom of the list.

It will then open the 'python Macros' dialog box. You should now see your python macros.

The 'wc.py' script file must be saved to the python scripts folder first in your users profile, for this to work.

Greengiant224

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 7:44 pm
by LoneWolffe
OK, still seems to not be working properly. I've double checked that wc.py is saved in C:\Users\LoneWolffe\AppData\Roaming\OpenOffice\4\user\Scripts\python and thanks for pointing me to the "Python Macros" dialogue.

Fullscreen capture 2252014 124012 PM.bmp.jpg


It seems there should be a (+) next to wc, but it doesn't show up like for the other scripts, such as under "OpenOffice Macros"

Thank you for your patience. I'm a total noob when it comes to scripts, macros, and all this stuff.

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 8:02 pm
by Greengiant224
LoneWolffe,

IIRC I had this trouble (no '+' next to the folder name)
You need to click the + mark to open the folder to view/select the python script/s.
Have you closed/restarted AOO? (including the Quickstarter if enabled)
This can sometimes cure all sorts of 'silly' problems.

Have you tried to select the 'Hello World' python script or any other in the OpenOffice folder?
Inserted in a new blank document, does this work.

Good luck

Greengiant224

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 8:30 pm
by RoryOF
A quick method of getting a word count is to consult /File /Properties /Statistics tab, or select text (Ctrl A does the whole file) and /Tools /Word Count gives the count of the selected text.

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 8:31 pm
by LoneWolffe
Oki, rebooted and tried again, same result. wc.py shows up, but there is no WordCount script to run. I downloaded the script from http://www.bit.ly/h5XQZw is there something wrong with it?

I did open a new document and tried running HelloWorld and Highlight, and they worked fine.

Also, RoryOF, yeah, i'm pretty much hard-wired to hit Alt+TW from time to time, but a running word count would be great.

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 9:26 pm
by RoryOF
An easy way is to figure what count a page of your standard output amounts to. My standard A5 (approx half US letter) amounts to 300 words in my usual spacing and typeface - not that I bother about wordcount, as I'm writing for my own pleasure.

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 9:51 pm
by Villeroy
Try the attached python file after removing the .zip suffix. It's plain source code. It works for me with AOO 4

Re: 'Live' Word Counter?

PostPosted: Tue Feb 25, 2014 11:42 pm
by LoneWolffe
Villeroy-
Thanks for the script, I guess the one I downloaded before isn't good. The macro works perfectly

Now I'm trying to get it to run from a button, and it doesn't like it, heh! Posted here https://forum.openoffice.org/en/forum/viewtopic.php?f=45&t=67952#p302762

Re: 'Live' Word Counter?

PostPosted: Wed Feb 26, 2014 12:01 am
by Villeroy
RuntimeExceptionError invoking function ... wordcount() takes no arguments (1 given).

Find def wordCount(): and add a placeholder for optional arguments: def wordCount(*args):

Re: 'Live' Word Counter? [Solved]

PostPosted: Wed Feb 26, 2014 12:10 am
by LoneWolffe
Villeroy-
Thank you!!! :bravo:

Re: 'Live' Word Counter?

PostPosted: Sun May 25, 2014 11:02 am
by Hagar Delest
For the record, some update with an extension created for that: [Solved and Issue] Add Word Count to the Status Bar.
Enhancement request still at Issue 41454: Add a character/word count in the status bar

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Sat Sep 20, 2014 8:28 am
by jesario

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Wed Sep 24, 2014 3:05 pm
by misseso
jesario wrote:This extensions works: http://extensions.services.openoffice.o ... controller

KBcw8Sp.png


Can confirm this extension works.

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Tue Dec 06, 2016 3:56 pm
by winterleaf
That extension (Word Count Statusbar Controller) doesn't provide a running word count, though.

It updates live, yes, but it only provides the overall total count, the cumulative count. As a writer, I really want to be able to place my cursor anywhere in the text and see how far into my prose I am in (1100 words of 9000, for instance). I.e. the word counter will measure all words and characters up to the point of the cursor. This function is available on Microsoft Word, or on Bean, however I do prefer to keep to Open Office.

Can you please let me know whether there is an extension for this that will work with MacOS Sierra?

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Tue Dec 06, 2016 4:01 pm
by RoryOF
I don't know of any word counter for OO that does what you require. However, it may be useful to know that the Statusbar counter also counts the words in the current selection, as well as the total count.

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Wed Dec 07, 2016 11:13 pm
by Villeroy
It should be very easy to modify an existing word counter so it distinguishes between the selected text range or the whole document when no text ranges is selected.

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Wed Dec 07, 2016 11:41 pm
by Zizi64
The word counting is a built-in feature in the LibreOffice.

Word count.png


...But it can not show the word count located before or after the actual cursor position.

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Thu Dec 08, 2016 12:38 am
by Villeroy
LO shows the word and character count of the selected text range or whole document in the status bar. Hit Ctrl+Shift+Home/End when you need the count for the preceeding/subsequent area.

And for OpenOffice https://bitbucket.org/yawaramin/oo.o-li ... /wiki/Home still works well.

Re: [Solved+Issue] 'Live' Word Counter?

PostPosted: Thu Dec 08, 2016 2:49 pm
by winterleaf
Some interesting ideas, but I already have installed an extension which will count a selected text range. I really am looking for something that will live-count up to the cursor, though, and not a substitute.
Thanks anyway!