On this Page

    _runScript

    (As of 3.0.003.19)

    Call DocOrigin RunScript. Runs RunScript, passing the argument list as command line parameters.

    Syntax

    _runScript(args)

    Parameters

    args is either a string listing all the RunScript command line parameters or a JavaScript object whose properties define the command line parameters. If args is a string, the string will be passed as-is to the RunScript program. If args is a JavaScript object, each object property name is converted to a DocOrigin-style -name parameter and the property's value becomes the parameter's value. The property names mirror the command line option names.

    Returned Value

    The return value from RunScript. RunScript will return 0 if it runs successfully. If RunScript cannot be found or cannot be run the return code is 111.

    Description

    Your application will wait until RunScript has been completed before resuming. There are a couple of bonuses in choosing to use _runScript instead of supplying the necessary parameters to -run. First is that you don't have to work out where the RunScript executable is. The second is that the -logfile specification that was provided to the app that is running your script will automatically be passed along to the RunScript app instance that you are launching. Of course, if you specify the -logfile option explicitly, your option will be the one in effect.

    See _merge (Call DocOrigin Merge) for more details and examples.

    Do check your return codes.

    See Also

    _run (Execute Another Program)
    _merge (Call DocOrigin Merge)