LEN (String Length)
Measures the character length of an input string (IN) and writes the count to the target INT variable.
Description
LEN returns the number of characters in src (IN). It is commonly paired with MID to iterate through multi-operation command strings character by character (1..{len}).
Syntax
- variable_name: Target
INTvariable receiving the character count - qualifier: Typically
ActionQualifier.P(Pulse) or attached to a transition - instruction:
ActionInstruction.LEN - src (
IN): SourceSTRINGvariable or literal
Sequence Visual Editor
- Select an action on a step or transition and hold Alt (or right-click -> Edit Qualifier & Instruction).
- Select Strings -> LEN and choose the P qualifier.
- Set the target
INTvariable and the sourceSTRINGoperand (IN).

The result is the number of characters of the operand.
Python
from automation_machine import ActionQualifier, ActionInstruction
step.add_action("{len}", "Get command length", qualifier=ActionQualifier.P, instruction=ActionInstruction.LEN, src="{cmd}")