script-run always does not seem to work as expected (v3.8)
Using a simple script to auto-respond to a device doesn't appear to have different behavior between "always" and "once". In either setting, the script will only run the first time tio is connected, and not again if the same expect statement is in the device output. Not entirely sure this is the expected behavior.
script-run = always
script = expect('console>'); write('prodtest enter 0\\r');
is functionally equivalent to
script-run = once
script = expect('console>'); write('prodtest enter 0\\r');
where the write happens only once.
From the tio man page:
--script-run once|always|never
Run script on connect once, always, or never.
Default value is "always".
Perhaps it is not clear enough but this means that the script is run only on the first connect (once) or every connect (always).
In your case, to react repeatedly on a specific string, you would have to call expect repeatedly. Since it is lua, you could do that in a loop etc.