# SuperSTAR 8

This is the documentation for SuperSTAR 9.8

SuperSTAR 9.9 is now available.
View this page in the SuperSTAR 9.9 documentation or visit the SuperSTAR 9.9 documentation home.

# macro

When performing repetitive tasks, instead of entering each command at the command line, you can enter the commands in a macro and then run the macro.

You can use the macro command to:

• Record all the commands you type into the console to a file.
• Play back a previously recorded macro file (this re-executes all the commands in the macro without you having to type them again).

By default, macros are stored in the SuperADMIN console\macros directory, but you can use the macro command to change this. In a default installation the macros directory is: C:\ProgramData\STR\SuperADMIN\console\macros

You can also write your own macros in a text editor and then play them in the SuperADMIN console: simply save the text file in the macros directory with the file extension .sam

UsageDescription
`macro record <name>`

Starts recording all commands to the specified macro file. SuperADMIN will save the macro file to the console\macros directory.

`macro stop <name>`
Stops recording commands to the specified macro.
`macro stop`
Stops recording all macros.
`macro {play|run|exec} <name>`
Plays back the specified macro.
`macro directory`
Displays the current location of the macros directory.
`macro directory <directory>`

Changes the location of the macros directory.

You can either enter a full path to the directory or you can enter a path relative to the location of the SuperADMIN console.

For example:

• The following command sets the macros directory to a location on the D: drive:

`macro directory D:\STR\macros`
• The following example sets the macro directory to C:\ProgramData\STR\SuperADMIN\console\macros (assuming that SuperADMIN is installed in the default location):

`macro directory macros`

If you are recording a macro and you use the ` login ` command and enter the username and password when prompted, then those credentials will not be saved to the macro.

To save a login command with credentials, use the short form of the login command (`login <username> <password>`).

`Encoding with BOM can be used to ensure correct encoding detection if needed.`