Script options accept CPD3 style script code to be executed. The context and availability of features depends on the option. CPD3 script code is derived from Lua 5.1 with CPD3 and LuaJIT extensions. Script code is often executed in a sandboxed environment, meaning that many OS level functions are not available. Most script print output is directed to the debug stream, and so is not visible unless explicitly enabled.

Basic script
--switch='for i=1,10 do print("Value = " .. i); end'
Script with stream context
--switch='for v in data do v.START = v.START + 100; end'

In contexts where the script is expected to produce a value, it should return that value as if called in a Lua function.

Script value result
--switch='return data.BsG_S11 == 0'