Issue

The ezScript command is resulting in an error.

 

Reason

There can be many reasons for an ezScript command to fail. The following are some regular issues and their resolutions.

 

Solution

Review the Catalyst batch log

The first place to look is the Catalyst batch log which will record the exit code for your command.
The log file can be found in:

• Microsoft Vista & Windows 7 = C:\Users\Public\Alchemy Software\Catalyst x.0\ezScriptBatchLog.txt

• All other Microsoft OS = C:\Documents and Settings\All Users\Alchemy Software\Catalyst x.0\ezScriptBatchLog.txt

Catalyst has exited with code 0 means the command was successful.

For any other exit code, refer to the ezScript Return Codes page for a description.

 

You can add the /open switch at the end of your ezScript commands in order to automatically open the ezScriptBatchLog.txt log file when the command is complete and thus review the results and exit code.
For example, this ezScript command to create a TTK from a text file will open the log file when complete:

Catalyst /M Rob TTKName:"C:\project A\Master.ttk" "C:\Project A\source files\File.txt" /open

 

Do not use relative paths in your file/folder names

Always use the full file paths in your ezScript commands. For example, this leverage command will fail:

Catalyst /L User "\folder1\ttkname1.ttk" "\folder2\subfolder1\ttkname2.ttk"

instead use

Catalyst /L User "C:\work\folder1\ttkname1.ttk" "C:\work\folder2\subfolder1\ttkname2.ttk"

 

File paths including spaces

Any file path containing a space character should be within quotes

Catalyst /L User C:\temp\work folder\ttkname1.ttk C:\temp\work folder\ttkname2.ttk

Should be

Catalyst /L User "C:\temp\work folder\ttkname1.ttk" "C:\temp\work folder\ttkname2.ttk"

Note, this applies to the username declaration also.

 

Loading a project profile

It is possible to configure Catalyst settings in Tools > Options. For example, all the leverage experts settings. And those settings can be saved in  Tools > Options> User profile > Save. This will generate an .ini file.
You can then load this .ini profile file in ezScript to suit the needs of your automation. For example, when working on Project A, load the projecta.ini profile before running the various commands. Then when running on Project B, load the projectb.ini profile.
 

To load a profile, use the following command:

Catalyst /C "C:\project profiles\project A\projecta.ini" /LOAD /CLEAN /open

Once you have loaded a profile, its options will be used  in all future ezScript Commands.

Create a TTK using a file list

While using a text file list to insert files in a TTK, make sure there are no tabulation characters at the end of each file path.

For example, creating a TTK using a file list would require an ezScript command like so:

Catalyst /M Bob TTKName:"C:\project B\Master.ttk" FileListFile:"C:\Project B\source files\File.txt"

The file list would look like this:

"C:\Samples\Catalyst.rc"

"C:\Samples\Catalyst.exe"__

"C:\Samples\IDBasedFiles.txt"

"C:\Samples\Conditional.xml"

__ denotes a tabulation character in the above file list. This will cause some files to not insert in the TTK and an exit code 4 is likely to be outputted to the log file.

 

ezScript Reference

The ezScript help can be viewed from Help menu > ezScript Reference

It contains all the syntax and examples of commands.

The ezScript help file itself can also be found in your Catalyst installation folder. By default, in C:\Program Files\Alchemy Software\Catalyst x.0\ezScript.chm

 

Related topics

 

Products or Versions Affected

  • Alchemy CATALYST 7.0  and greater

 

Last updated with Catalyst 9.0.