[Solved+Issue] 'Live' Word Counter?

Discuss the word processor
sheryld
Posts: 1
Joined: Mon Jun 15, 2009 2:01 am

[Solved+Issue] 'Live' Word Counter?

Post 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)
Last edited by Hagar Delest on Sun May 25, 2014 11:03 am, edited 1 time in total.
Reason: tagged [Solved].
OOo 2.3.X on Ms Windows XP
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: COUNTER

Post by acknak »

Sorry, no; not a "live" counter.

Tools > Word Count is about the best you can do.
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: COUNTER

Post 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] 
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
franx
Volunteer
Posts: 540
Joined: Wed Nov 12, 2008 9:25 pm
Location: FRA 'n' QXB

Re: 'Live' Word Counter?

Post by franx »

Hi,

... you might also have a look at →
EuroOffice My Progress
(... for more complex documents ...)
LibreOffice 4.0.4 · WinXP
User avatar
TheGurkha
Volunteer
Posts: 6482
Joined: Thu Mar 13, 2008 12:13 pm
Location: North Wales, UK.

Re: 'Live' Word Counter?

Post 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.
Ubuntu 14.10 Utopic Unicorn, LibreOffice Version: 4.3.3.2
Gurkha Welfare Trust
User avatar
franx
Volunteer
Posts: 540
Joined: Wed Nov 12, 2008 9:25 pm
Location: FRA 'n' QXB

Re: 'Live' Word Counter?

Post 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
LibreOffice 4.0.4 · WinXP
User avatar
Dingo-Dog
Posts: 56
Joined: Fri Sep 05, 2008 11:26 pm

Re: 'Live' Word Counter?

Post 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/
yawar
Posts: 3
Joined: Fri Sep 10, 2010 1:26 am

Re: 'Live' Word Counter?

Post 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-liv ... /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
OpenOffice.org 3.2.1 on Mac OS X 10.6.4
User avatar
LoneWolffe
Posts: 14
Joined: Mon Feb 03, 2014 4:12 pm
Location: Carhuaz, Ancash, Peru

Re: 'Live' Word Counter?

Post 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/ ... ips-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? :(
"There is no such thing as a foolproof system. Someone will make a better fool, tomorrow." @LoneWolffe

Apache OpenOffice 4.0.1
Windows 7x64 Pro
User avatar
Greengiant224
Posts: 283
Joined: Wed Jun 09, 2010 3:50 pm
Location: All Over The World

Re: 'Live' Word Counter?

Post 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

Win 7, Portable AOO 4.1.14, LibreOffice 6.2, 7.4.5 & 7.6.1 (Java 1.7.81 & 1.8.0_281) utilising HSQL 1.8.10 & 2.4.*, MySQL, PostgreSQL, SQLite
+ Blood, Sweat and Tears (Application, Determination and Perseverance)
User avatar
LoneWolffe
Posts: 14
Joined: Mon Feb 03, 2014 4:12 pm
Location: Carhuaz, Ancash, Peru

Re: 'Live' Word Counter?

Post 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
"There is no such thing as a foolproof system. Someone will make a better fool, tomorrow." @LoneWolffe

Apache OpenOffice 4.0.1
Windows 7x64 Pro
User avatar
Greengiant224
Posts: 283
Joined: Wed Jun 09, 2010 3:50 pm
Location: All Over The World

Re: 'Live' Word Counter?

Post 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

Win 7, Portable AOO 4.1.14, LibreOffice 6.2, 7.4.5 & 7.6.1 (Java 1.7.81 & 1.8.0_281) utilising HSQL 1.8.10 & 2.4.*, MySQL, PostgreSQL, SQLite
+ Blood, Sweat and Tears (Application, Determination and Perseverance)
User avatar
LoneWolffe
Posts: 14
Joined: Mon Feb 03, 2014 4:12 pm
Location: Carhuaz, Ancash, Peru

Re: 'Live' Word Counter?

Post 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.
"There is no such thing as a foolproof system. Someone will make a better fool, tomorrow." @LoneWolffe

Apache OpenOffice 4.0.1
Windows 7x64 Pro
User avatar
Greengiant224
Posts: 283
Joined: Wed Jun 09, 2010 3:50 pm
Location: All Over The World

Re: 'Live' Word Counter?

Post 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

Win 7, Portable AOO 4.1.14, LibreOffice 6.2, 7.4.5 & 7.6.1 (Java 1.7.81 & 1.8.0_281) utilising HSQL 1.8.10 & 2.4.*, MySQL, PostgreSQL, SQLite
+ Blood, Sweat and Tears (Application, Determination and Perseverance)
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: 'Live' Word Counter?

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
LoneWolffe
Posts: 14
Joined: Mon Feb 03, 2014 4:12 pm
Location: Carhuaz, Ancash, Peru

Re: 'Live' Word Counter?

Post 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.
"There is no such thing as a foolproof system. Someone will make a better fool, tomorrow." @LoneWolffe

Apache OpenOffice 4.0.1
Windows 7x64 Pro
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: 'Live' Word Counter?

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: 'Live' Word Counter?

Post by Villeroy »

Try the attached python file after removing the .zip suffix. It's plain source code. It works for me with AOO 4
Attachments
wordcount.py.zip
Version that works with AOO 4. Remove the .zip from the file name. It's not a zip.
(7.2 KiB) Downloaded 215 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
LoneWolffe
Posts: 14
Joined: Mon Feb 03, 2014 4:12 pm
Location: Carhuaz, Ancash, Peru

Re: 'Live' Word Counter?

Post 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 viewtopic.php?f=45&t=67952#p302762
"There is no such thing as a foolproof system. Someone will make a better fool, tomorrow." @LoneWolffe

Apache OpenOffice 4.0.1
Windows 7x64 Pro
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: 'Live' Word Counter?

Post by Villeroy »

RuntimeExceptionError invoking function ... wordcount() takes no arguments (1 given).

Find def wordCount(): and add a placeholder for optional arguments: def wordCount(*args):
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
LoneWolffe
Posts: 14
Joined: Mon Feb 03, 2014 4:12 pm
Location: Carhuaz, Ancash, Peru

Re: 'Live' Word Counter? [Solved]

Post by LoneWolffe »

Villeroy-
Thank you!!! :bravo:
"There is no such thing as a foolproof system. Someone will make a better fool, tomorrow." @LoneWolffe

Apache OpenOffice 4.0.1
Windows 7x64 Pro
User avatar
Hagar Delest
Moderator
Posts: 32627
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: 'Live' Word Counter?

Post 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
LibreOffice 7.6.2.1 on Xubuntu 23.10 and 7.6.4.1 portable on Windows 10
jesario
Posts: 1
Joined: Sat Sep 20, 2014 8:24 am

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

Post by jesario »

OpenOffice 4.1.1 on Windows 7
misseso
Posts: 1
Joined: Wed Sep 24, 2014 3:02 pm

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

Post by misseso »

jesario wrote:This extensions works: http://extensions.services.openoffice.o ... controller
KBcw8Sp.png
Can confirm this extension works.
OpenOffice 4.1.0 on Mac OSX 10.9.4
winterleaf
Posts: 9
Joined: Tue Dec 06, 2016 3:49 pm

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

Post 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?
OpenOffice 4.1.3 on MacOS 10.12.1 - 64 bit
User avatar
RoryOF
Moderator
Posts: 34586
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

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

Post 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.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Zizi64
Volunteer
Posts: 11353
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

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

Post 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.
Last edited by Zizi64 on Thu Dec 08, 2016 8:54 am, edited 1 time in total.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
Villeroy
Volunteer
Posts: 31269
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

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

Post 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.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
winterleaf
Posts: 9
Joined: Tue Dec 06, 2016 3:49 pm

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

Post 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!
OpenOffice 4.1.3 on MacOS 10.12.1 - 64 bit
Post Reply