Skip to content
ZeroTrace cybersecurity hardware and software

ZeroTrace HID

Comments

Comments let you add notes or explanations to your ZeroTrace scripts. They make scripts easier to read and are ignored during execution.


How to Write Comments

1. Use # or //

  • You can place # or // at the start of a line or after a command.
  • Everything after # or // is ignored by the interpreter.
# Full-line comment

writeLn "Hello" // Inline comment

delay "1000" # Another inline comment

// Another full-line comment

2. Freestyle Notes

  • Any line that does not match a command is treated as a comment and ignored.
  • You can write plain notes as long as they do not start with a valid command.
This is a freestyle note and will be ignored.
Anything that does not look like a command is safe to use as a comment.

Warning: If a freestyle note starts with a valid command (for example writeLn or delay), it will execute.

Block behavior: Inside write-style blocks (for example writeStart...writeEnd and writeLnStart...writeLnEnd), lines are treated as raw text. Prefixes like # and // are typed as output and are not stripped as comments.


Good Examples

# This script prints a message
writeLn "Hello, World!" // Inline comment

// Wait before next command
delay "1000"

This is a freestyle note about what happens next

_$VAR isAdmin = "true" // Variable assignment with comment

Bad Example

writeLn "Test" This looks like a command and may cause errors

The text after writeLn "Test" is not marked as a comment. Always use # or // for inline comments after commands.


Tip: For readability, consistently use # or // for comments.

Command Palette

Search for a command to run...