Have script listen for additional arguments


#1

Hello,

Is it possible to either run an Otii Lua script from the command line, or to input arguments in the Otii scripting window as the script is running? In testing, it did not seem like the script was able to read new arguments entered in the “Argument” field using io.read().

Thank you!


#2

Hi,

It is possible to run the script in command line by using:

otiicli “name_of_the_script.lua”

While running the script in command line you can use io.read() to get user inputs.
However, it is not possible to input arguments, while running the script, in the Otii UI.

Best regards,
Björn


#3

Hi,

If you just want arguments in the start of the script in the UI, then you can use:
get_args()

Best regards,
Björn


#4

Hi Bjorn,

Thanks! How do I install/open otiicli?

Ashley


#5

Hi,

In your Otii installation folder you can find otiicli application.
Just use a terminal window and call

otiicli name_of_the_script.lua

You might need to add otii in your path

Best regards,
Björn