Skip navigation
Home/Support/

Forums

340 Views 8 Replies Latest reply: May 12, 2010 4:52 AM by EileenPalsson RSS
Bruce4800 User 48 posts since
Oct 24, 2005
Currently Being Moderated

Jan 22, 2010 10:58 AM

Tools > Scripts > Word Count is broken; can I fix it?

RH HTML; 8.0.2.208

The script at "Tools > Scripts > Word Count" says "Bad Argument GetTokenManager" and fails.

It broke while I had 8.0.1, or maybe while I had 8.0.0.

Can I fix this?

  • Colum McAndrew Participant 4,298 posts since
    Oct 8, 2004

    You could try looking for the "word count.jsx" file on your install CD which should get you back to the 8.0.0 version. If that doesn't work, let me know and I'll see if I can email you my version.

     

     


    • Read the RoboColum(n) for a tips, tricks and musings on the Technical Communication Suite products.
    • Follow the RoboColum(n) on Twitter
  • Praful_Jain Calculating status... 161 posts since
    Mar 15, 2008

    Hi,

    Did you try running the script with a new project, just create a new dummy project and try running the word count script and see if it works or not.

     

    Also can you let me know what all message are shown in the output view, as this script write log in the output view in RoboHelp 8. To view output view, Select View > Pods > Output View.

     

    Thanks

    Praful

  • Praful_Jain User 161 posts since
    Mar 15, 2008

    HI,

    if the script is working for a dummy project, it means the script is working fine, and there is some issue when we run this script in your project.

    Please open script pod and right click on the word count.jsx file and select edit option. this will open the word count script in Extendscript editor (or notepad).

     

    Search for the following line in the script file var tknmgr = RoboHelp.getTokenManager (filepath);

    and add the following statement before this line.  msg(filepath);

     

    so the new code looks like

    msg(filepath);
    var tknmgr = RoboHelp.getTokenManager (filepath);

     

    Now save this file and again run the script file from RoboHelp 8 by right click and run.

    this will show the messages in the output view, as to which topic it is trying to open using the token manager and we can get to know where the script is breaking.

    it will print the file path of the topic which is causing the problem, Please see if you can open that topic from project manager in your Project or not.

     

     

    Do let me know the log in the output view, after you have modified the script file and run it again.

     

    -Praful

  • Praful_Jain User 161 posts since
    Mar 15, 2008

    Hi,

    Regarding the word count script file, I modified the script file a bit, so that the script file does not stop in case the file is missing or corrupt.

    I am attaching the new Word Count Script file, which does the check for file presence as well.

     

    -Praful

    Attachments:
  • EileenPalsson Calculating status... 208 posts since
    Nov 26, 2004

    Thank you for the above postings, which were useful when I got the same error message when running the PopupPlacementFixer script. By adding the msg(filepath); line to the other script, I was able to find the file that was missing from the project -- the last one listed in the Output window was the missing one. Thanks!

    Eileen

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points