Skip to main content
Jared Hess
Legend
September 4, 2013
Question

Is a Sentence Level Wordcount Possible via Scripting?

  • September 4, 2013
  • 3 replies
  • 814 views

I'm interested in creating a script that works at the sentence level that counts the number of words in a selected sentence and reports it in the Output View to help the author write more concisely. Is such a thing is possible in RoboHelp 9, the verison I have? For example, can a RH script operate on selected text, like it can in a Word macro?

It's been a while since I've worked ona RH script, but from what I remember, something like this isn't possilble.

If that isn't possible, is it possible to to it at the topic level? For example, go through each sentence, count all the words in each sentence in a topic, and if any sentence is greater than the number of specified words, it displays that sentence in the output view.

This topic has been closed for replies.

3 replies

Participant
November 20, 2013

another tool to count and spell check

http://codebeautify.org/wordcounter

Jared Hess
Legend
November 20, 2013

Thanks. I ended up creating a script in RH 9 where I type in the HTML name and it goes through each sentence and spits out those with more than the desired number of words in the output pane. It's a bit of a hack, but it serves my purposes.

Participant
June 21, 2018

Thanks for this post nice article Word Counter

Willam van Weelden
Inspiring
September 5, 2013

Just to add: In RH10 you can be notified when a topic is opened or closed. With scripting there is no way to determine which content on a page is selected. The only way to know which topics are currently opened is by setting a script to monitor the open and close topic events and save the open topics in a settings file so that other scripts can use that information.

Greet,

Willam

Jared Hess
Legend
September 4, 2013

Nevermind. I figured out a way to do it at the topic level, and that's sufficient for me.

Peter Grainge
Community Expert
Community Expert
September 6, 2013

Jared

Just saw a link to http://www.wordcounter.net/


See www.grainge.org for RoboHelp and Authoring tips

@petergrainge

Use the menu (bottom right) to mark the Best Answer or Highlight particularly useful replies. Found the answer elsewhere? Share it here.