• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Error when running script to reset size - bad argument gettokenmanager

Community Beginner ,
Feb 20, 2011 Feb 20, 2011

Copy link to clipboard

Copied

Hello,

I use RoboHelp HTML 8 (currently on 8.0.2.208) and have a project with a number of user interface images that are going to be translated. The translated images will likely be of different size, so I need to have a fast way of reseting all the image sizes in my project.

I discovered Chasnikov's script "reset all images" on the thread:

http://forums.adobe.com/message/2128583#2128583

which seems just perfect for my situation.

Not wanting to test this on my real project, I made a copy in a different location and tested out the script. The script ran for a while, but then abruptly ended with the following message:

Bad argument getTokenManager

In looking at the output window it seemed like it stopped in the middle of a topic after going through a number of topics. For my test situation, I only replaced a few graphics in a few topics and when I checked this limited sample, they all seemed to be correctly resized.

However, my concern is that if I use this script in my real project, it won't actually resize all of the images.

Any ideas why the script is terminating abruptly?

By the way, I did find a similar question about this error message in the thread http://forums.adobe.com/message/2551147

however, the solution to add the line msg(filepath); to the script resulted in another error -- RH did not recognize 'msg' as a valid command.

Thanks, Rose

Views

500

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 21, 2011 Feb 21, 2011

Copy link to clipboard

Copied

Hi Rose,

Welcome to the RoboHelp community. Although I'm not the author of the script, I hope I can help you.

I just tested the script on a project and I didn't get any errors. The following may solve your problem:

Open the script and go to line 41. Add a new line and add try { to that line. Now go to line 76 (before the last } of the script) and add a new line. Add } catch(e) {  outputMsg("\nError while processing file '"+filepath+"'\n"); }.

Every time the script cannot process a topic or snippet, the script creates an error message. Hope this helps.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 24, 2011 Feb 24, 2011

Copy link to clipboard

Copied

Thanks Willam for the advice. In the meantime I realized that there was something wrong with my project--because the word count script also gave me the same error message -- so I ran it on another version of the project and it was just fine.

There are two questions that your response brings to mind:

1. How are you able to see the line numbers in the script?  When I edit the script, it opens in Notepad and I can't turn on line numbers. I have discovered, that if I have word wrap off, I can use Goto and specifiy a line number to go to.  Are you using a different text editor?

2. The reset size script doesn't announce that it is finished.  It just seems to stop displaying things in the output window, but it doesn't give me a message to say it has finished.  Can you recommend some code I could add to the reset size script to output that it has finished processing sucessfully?

Thanks in advance.

Rose

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Feb 25, 2011 Feb 25, 2011

Copy link to clipboard

Copied

LATEST

Hi Rose,

I use the Adobe ExtendScript Toolkit. It's a free tool for creating and editing scripts and you should have it installed when you use RoboHelp 8. You can also use a text editor like Notepad++. Both show line numbers and have syntax highlighting.

As to a message, add alert('Script executed'); on line 31. When the script finished, RoboHelp will show an alert.

Greet,

Willam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
RoboHelp Documentation
Download Adobe RoboHelp