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

Bad argument openProject when running SaveAsProjectTemplate.jsx

New Here ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Hi

I have created a RoboHelp 8 project template and rolled it out to the team for use in an upcoming project.

Six authors have been able to load the project then, using the Script Explorer, have run the SaveAsProjectTemplate.jsx script to make it a project template. One author has attempted to run this script and been confronted with the error Bad argument openProject once they accepted the default location.

The installation process was identical for all seven machines, it activated/registered without a hitch and all available updates have been run on the seven machines (we are all on 8.0.2.208).

Does anybody know, please, why this error might be occuring on just one machine?

Many thanks

Nigel

Views

1.8K

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

correct answers 1 Correct answer

LEGEND , May 12, 2011 May 12, 2011

Hi Nigel,

I didn't see your last post when I posted my earlier reply. Using Windows 7 may indeed be a problem. I had a problem with writing files when User Account Control was enabled. This blocked the script from writing files to protected locations as C:\Users and C:\Program Files. It didn't produce any errors, the files were simply not created/modified and the script kept running.

Can you disable UAC for now and run the script again?

Greet,

Willam

Votes

Translate

Translate
LEGEND ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Hi Nigel and welcome to the RH forums. Things to try include:

  1. Running one of the pre-installed scripts (e.g. Word Count).
  2. Reinstalling the Extend Script add on.


  The RoboColum(n)   @robocolumn   Colum McAndrew

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
New Here ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Hi Colum - and thanks for your help.

The Word Count script runs fine on our template (returning 300 words, or so). We're still getting to grips with RH8 and not sure how to re-install the Extend Script add-on - should we uninstall everything and start from scratch or is there a simple way of just re-installing ES?

Many thanks

Nigel

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 ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

No problem Nigel. Did you run the Word Count on the affected PC? If so, this is unlikely to be anything with the ExtendScript plugin. It maybe worth trying though. If you run the setup.exe for the RoboHelp Office application, you should be able topick and choose which elements are installed. One of them should be ExtendScript. Just select this option only on the affected PC.

One other thought I have is that you mention "default location". Would mapped or networked drives have any bearing on the error?


  The RoboColum(n)   @robocolumn   Colum McAndrew

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
New Here ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Thanks again Colum.

I've run Setup.exe with the bottom option selected, as advised but to no avail.

Our PCs have a C: drive and a D: drive which are not mapped drives. The template we are attempting to save as the project template is located on the D: drive and the 'default location' the script suggests is the En_US folder on the C: drive.

Dare I mention that the PC that does not work is a Windows 7 PC (I should have mentioned this before), so could it be a weird permissions thing?

Thanks

Nigel

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 ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Hi Nigel,

I didn't see your last post when I posted my earlier reply. Using Windows 7 may indeed be a problem. I had a problem with writing files when User Account Control was enabled. This blocked the script from writing files to protected locations as C:\Users and C:\Program Files. It didn't produce any errors, the files were simply not created/modified and the script kept running.

Can you disable UAC for now and run the script again?

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
New Here ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Hi Willam... This has worked! Changing the setting to the bottom level, restarting the machine and trying again fixed the problem. Thanks very much to both of you for your help

Nigel

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
New Here ,
Nov 17, 2011 Nov 17, 2011

Copy link to clipboard

Copied

Hello,

I've run into the same problem (i.e., getting the Bad argument openProject error) when trying to run the UpdateFM.jsx script provided in this (somewhat related) thread: http://forums.adobe.com/message/203012#203012

But I'm running Windows XP, so the User Access Control problem doesn't apply here (as far as I can tell). Any thoughts on what might be going on?

Also, the script works perfectly when I run it from within RoboHelp (i.e., in the Script Explorer), but I cannot get it to work from the command line.

Thanks in advance for any ideas!

-Ryan

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
New Here ,
Nov 18, 2011 Nov 18, 2011

Copy link to clipboard

Copied

LATEST

My colleague (Robert Lauriston) just solved it for me: the problem was in the error handling part of the script:

if(projectPath = '')

        {

               //Error!. Quit RoboHelp

               alert("Project path is not defined. \nPlease update the 'projectPath' variable in the script.");

               RoboHelp.quit();

        }

Once I removed that, the stripped-down version worked just as I had hoped:

var projectPath = "C:\\techpubs\\AG\\SentrionAdminGuide.xpj";

// User should update the project path.

// e.g. "C:\\Users\\mayank\\Documents\\My RoboHelp Projects\\RH8_1\\RH8_1.xpj"

//PLEASE NOTE:  Replace '\' with '\\' in the path above.

main();

function main()

{

        RoboHelp.openProject(projectPath); //Open the project

        RoboHelp.project.updateAll(true); //Update all linked documents (pass true for Force update)

}

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 ,
May 12, 2011 May 12, 2011

Copy link to clipboard

Copied

Hi,

The script tries to open a project twice: Once it opens the new template project to rename it to Template. After that, it closes the template project and tries to reopen the original project. When does the error occur?

My best guess is that you have some exotic path name that the script can't parse. You can try adding a few alerts around line 48 to see which projects the script tries to open.

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