Skip to content

Create NIM script

Auke Bruinsma edited this page Dec 20, 2023 · 2 revisions

Create a NIM script

The nimScript project is now ready to create a first NIM script. By convention, the script functions are stored in script.ts. Start with the signature of the function:

export async function functionName(arg1,arg2,)
export async function userCreate(commonName:string)

Note

Each script function signature must start with export async.

When entering typescript code for the function, the autocomplete features of Visual Studio Code show the names of filters, filter parameters, filter return values, systems etc.

image

When ready creating the script function, make a call to execute the function in the nimScript project in file main.ts:

image

In this example, an account with common name Sophie_xxx is created, where xxx is a random number. Compile the script with menu option Terminal, Run Build Task…. Set a breakpoint with F9. With Start Debugging, (F5), run the script:

image

When the breakpoint is hit, hover over a variable of interest. All relevant information is shown.