# Create a User Script

This topic provides an example for creating a user script.

1. To create a User Script, right-click on the User Scripts node in the Project Explorer and select New Script, which will launch the Script Definition Editor. You will then be asked to specify the Name, Arguments (inputs) and the Return Type (output).

2. In this example we are creating a Script called MyTestScript.
3. It has two input arguments: string message and int count. The script will return a string variable.
4. Once you click Accept, Cognex Designer will open the Script Editor for this script.

5. Once the script has been saved, it can be called from another script, as shown below.

       string resultText =  MyTestScript("Hello",99 );