Updating UI Elements
Making the GUI work for your automation
Have you ever wondered how scripts can interact with and update the Lua interface window? Today, we'll take a closer look at a Lua script that demonstrates various ways to modify the IDE's behavior and appearance.
The following example shows the scripting functionality available to alter the state of the Lua IDE window.
Lua
-- An example program that shows some of the ways that a script can update
-- the window.
ui.Log("Starting")
ui.Sleep(1000)
ui.Log("Setting status text")
ui.Sleep(1000)
ui.StatusText = "This is a new status text message"
ui.Log("Maximize window")
ui.Sleep(1000)
ui.Maximize()
ui.Log("Minimize window")
ui.Sleep(1000)
ui.Minimize()
ui.Log("Restoring window (activate)")
ui.Sleep(1000)
ui.Activate()
ui.Log("Set Window Title")
ui.Sleep(1000)
ui.Title = "Untitled"
ui.Log("Hiding the window in 2 seconds")
ui.Sleep(2000)
ui.HideWindow()
ui.Log("Showing the window in 2 seconds")
ui.Sleep(2000)
ui.ShowWindow()
ui.Log("Complete")