-
-
Notifications
You must be signed in to change notification settings - Fork 1
Basic text input output.
There are four different way to output text.
-- Text examples
ui.status("Status")
ui.out("Output")
ui.console("Console")
print("Print")
return("Return")
ui.status()
is used to output the current status. This will show up under the buttons when running. Main use is to get live updates from your Lua-script if you are doing things that takes a long time like generating many images.
ui.out()
will write text to the Output box. But you won't see the result until the entire script has finished.
ui.console()
& print()
will print text directly to the shell/cmd window where you started the webui. Useful for debugging and live updates.
return()
, if you have this at the end of the Lua script, the argument will be written to the Output box at exit. (It is optional to have a return().)
In the top left, above the buttons there is a small Input
textbox.
Anything written in here will be assigned to the variable input
before the Lua script is started. To test this you can use this simple example:
-- Input test. Type something in the input box and press Run.
-- What you entered should show up in the Output textbox.
return(input)