Running a script from other applications
Scripts developed with the workbench can be run from external applications. Below are possible calling mode:
From the command line:
Scripts can be executed directly from the Windows console or from .BAT files, using the "K5Script.exe" utility program installed with the Workbench.
Syntax:
K5Script.exe <script> <target_project>
Arguments:
<script> : Name of the folder containing the script. If no pathname is specified, the script folder is searched under the "AUTOMATION\SCRIPTS\" folder where the Workbench is installed.
<target_project> : full qualified pathname of the target project to be created or modified by the script
From application using COM interface:
Not available yet.
From "C / C++" applications:
Your "C/C++" applications can link to the "K5NETAS.DLL" located with the installed Workbench and use the following export function to run a script:
From "C" language:
LPCSTR __declspec(dllimport) K5NETAS_RunScript (LPCSTR szScript, LPCSTR szDest);
From "C++" language:
extern "C" LPCSTR __declspec(dllimport) K5NETAS_RunScript (LPCSTR szScript, LPCSTR szDest);
Arguments:
szScript : Name of the folder containing the script. If no pathname is specified, the script folder is searched under the "AUTOMATION\SCRIPTS\" folder where the Workbench is installed.
szDest : full qualified pathname of the target project to be created or modified by the script
Return value:
The function returns a pointer to a string containing the report.