Batch Execution
Execute multiple DexComX commands in a single message using batch mode.
Syntax
How It Works
Prefix your multi-line script with m.run (or m.run) and DexComX will execute each line sequentially.
Examples
Basic Batch Script
m.run
CREATE > BALL > Germany
UPDATE > BALL > Germany > HEALTH > 100
UPDATE > BALL > Germany > ATTACK > 90
UPDATE > BALL > Germany > REGIME > Democracy
With Comments
m.run
-- Create new balls
CREATE > BALL > France
CREATE > BALL > Germany
-- Configure France
UPDATE > BALL > France > HEALTH > 100
UPDATE > BALL > France > ATTACK > 85
-- Configure Germany
UPDATE > BALL > Germany > HEALTH > 105
UPDATE > BALL > Germany > ATTACK > 90
Mixed Commands
m.run
-- Filter operations
FILTER.UPDATE > BALL > REGIME > Democracy > Republic
FILTER.DELETE > BALL > REGIME > Communist
-- Create new ball
CREATE > BALL > NewCountry
-- File operations
FILE.READ > ./config.json
Error Handling
If any command in the batch fails: - DexComX continues executing remaining commands - All errors are collected and shown at the end - Successful commands show ✅ reaction
Benefits
- Paste entire scripts - Copy/paste from text files
- Atomic operations - Run related commands together
- Script sharing - Share full workflows with others
- Version control - Save scripts in git
Alternative: Single Command Mode
Without m.run, send one command per message:
Batch mode is faster for multiple commands.
Tips
- Test individual commands first - Verify syntax before batching
- Use comments liberally - Document what each section does
- Save scripts as files - Keep reusable scripts in your project
- Check for errors - Review all error messages at the end
See Also
- Comments - Document your batch scripts
- Syntax Overview - Command structure
- Aliases - Speed up batch scripts