Scripting in Total Control
FreshTotal Control supports multiple scripting approaches for automation:
Scripting Languages
| Language | Best For | Complexity |
|---|---|---|
| AAIS | Simple tests, quick automation | Low |
| JavaScript (Rhino) | Complex scripts, full logic | Medium-High |
| REST API | External tools, CI/CD integration | Medium |
| JS API | Direct TC scripting | Medium |
AAIS vs JavaScript
| Feature | AAIS | JavaScript |
|---|---|---|
| Syntax | Simple commands | Full JS language |
| Threading | Multi-threaded (1-50 devices) | Single-threaded per script |
| File extension | .tst | .js |
| Object-based | Yes | Yes |
| Coordinate-free | Yes | Yes |
| Error handling | Script stops on failure | Try/catch available |
| Variables | Limited (save/load) | Full JS variables |
| Loops | Via JavaScript blocks | Native for/while |
Getting Started
- AAIS — Best starting point for simple tests. See AAIS Script Language
- JavaScript — For complex logic and reusable functions. See JavaScript (Rhino)
- Device Classes — Understanding device objects. See Device & DeviceArray
Running Scripts
Scripts run through the Runner interface in either:
- MDCC (Multi-Device Control Center) — for multi-device execution
- WDM (Windows Desktop Mode) — for single-device testing
The task window displays progress and logs during execution.