Skip to content

Create a Script

An AutoSteps script defines what AutoSteps runs: a program (the executable), the arguments for it, and optionally a file, such as an AutoHotkey script or a self-contained .exe file, that AutoSteps copies to the computer before each run.

How a script reports data to PerformanceGuard

Section titled “How a script reports data to PerformanceGuard”

A script reports its measurements through the PerformanceGuard agent on the same computer. The data must follow the structure that the Autosteps Chart Widget uses. How a script communicates with the agent is described in Monitor Complex Activity with AutoSteps.

A script reports these values:

Property Description Example
Transaction Group The overall category of the measurement. Maximum 64 characters. TransactionGroup = PG Demo Scripts
Transaction Name A narrower category, typically the application or website that the script tests. Maximum 64 characters. TransactionName = NOTEPAD Document
Tags The exact operation that the script performed. Maximum 64 characters. ComPG1.setTag("NOTEPAD startup")
ComPG1.setTag("Type in text")
ComPG1.setTag("Save NOTEPAD document")

The reported transaction groups, names and tags appear on the AutoSteps Activity page.

  1. Select Administration → AutoSteps → Scripts.
  2. Select Create Create button.
  3. In Name, type a name for the script.
  4. In Category, select a script category. To create a new category, select New category New category button next to the field. Categories help you organize and find your scripts.
  5. In Executable, type the program that runs the script, for example autohotkey.exe or cmd.exe.
  6. In Executable parameters, type the arguments for the program, in the order and syntax that the program expects. For example /c btmutil_demo.bat for cmd.exe.
  7. In Timeout in seconds, type how long the script can run. The default is 60 seconds. If the script is still running when the timeout expires, AutoSteps stops it, and the run counts as failed.
  8. Optional: select Upload file and select the file that the executable should run, for example an .ahk script.
  9. Select Create.

The script appears in the list. The Job count column shows how many jobs use it.

New script dialog with the executable and executable parameters filled in

Before each run, AutoSteps copies the uploaded file to a working folder on the computer, and starts the executable in that folder. To run the uploaded file, add its file name to Executable parameters, for example notepad_demo.ahk.

You can define parameters as variables, so that each job can use its own value. Enclose each variable name in hash signs (#), for example /c #parameter1# #parameter2#. Text that isn’t enclosed in hash signs is passed to the executable as it is.

When you leave the Executable parameters field, a Default parameter values section shows a field for each variable. Type the value that jobs use by default. In a job, you can override the default value. See Create a Job.

Default parameter values section with a field for each parameter variable

AutoSteps can run a self-contained executable (.exe file) that you upload with the script. You then don’t have to install the program on the computers that run the script.

  1. Select Administration → AutoSteps → Scripts and select Create Create button.
  2. In Executable, type the file name of the executable that you upload.
  3. If the executable takes arguments, type them in Executable parameters, for example /c dir c:.
  4. Select Upload file, select the executable, and then select Create.

New script dialog with an uploaded self-contained executable

Select the menu button Script menu button next to a script, and then select one of these:

  • Edit: Change the script. To replace the uploaded file, select Upload file again.
  • Download file: Save the uploaded file on your computer. This is only available if the script has an uploaded file.
  • Delete: Select Delete, and then select Confirm.