Thumbnail

Script Collection

Manage and execute multiple scripts in a single Script Manager using ControlCommand(), with Control Details showing available commands.

How to add the Script Collection robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Scripting category tab.
  5. Press the Script Collection icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Script Collection robot skill.


How to use the Script Collection robot skill

The Script Collection (also known as the Script Manager) is a control that can store multiple scripts in one place. This is helpful because you don’t need to add a separate Script control for every script—this single control can hold many scripts and keep your project more organized.

Running a script from the Script Collection

Just like the regular Script control, you can start a script inside the Script Collection by using ControlCommand() from any script in your project.

Example: this starts a script named MyScript that is stored inside the Script Collection control named Script Manager.

ControlCommand("Script Manager", "ScriptStart", "MyScript")
How this command is structured (simple breakdown)

ControlCommand() uses three main pieces of information:

  • Control Name — the name of the control you added to the ARC project (example: "Script Manager")
  • Command — what you want that control to do (example: "ScriptStart")
  • Parameter — extra information the command needs (example: the script name "MyScript")
Finding the available ControlCommand options

If you’re not sure what commands are available, ARC can show you a list:

  1. Open (edit) any script in your project.
  2. Click the Control Details tab.
  3. Browse the list of controls in your project to see the supported ControlCommand() options.

The Control Details tab will display the commands for all controls in your project, including the Script Collection. Each script in the Script Collection can be executed by calling it by name, as shown in the example above.

Common beginner workflow
  1. Add the Script Collection / Script Manager control to your ARC project.
  2. Create multiple scripts inside it (for example: Init, Wave, Dance).
  3. Start any one of those scripts from another script using ControlCommand().

Video

Related Tutorials

Related Questions


ARC Pro

Upgrade to ARC Pro

Get access to the latest features and updates before they're released. You'll have everything that's needed to unleash your robot's potential!