Preparing a Script to Start with Parameters

  • You want a script to execute its instructions on different objects. In this case you have to create a script that requires parameters and then start this script by providing such objects as parameters.
  1. Do one of the following:
  • Provide an individual parameter. You can access the parameter in the script by referencing the variable scriptParameter.
  • Provide many parameters: use the JSON syntax.
    For example, for passing two parameters to a script, you must provide as parameter a string like the following:
    { "par1": "value1", "par2": "value2" }
    In this case, the parameters are accessed in the script by referencing the variable names par1 and par2.
    NOTE: A script can only accept one JSON string as parameter. It is not possible to use comma-separated JSON string or arrays of JSON strings as they will be considered simple strings.
  1. Test or debug the script.