Appearance
GUI control and window capture
Use this specialized API when you need to click GUI controls or capture the application window. For scene inspection, editing, simulation and Camera export, use Workspace RPC.
GUI control requires a script in the application's embedded interpreter. Save this as inspect_ui.py:
python
import flarelive_ui as ui
print(ui.describe_api())
print(ui.window_info())
print(ui.list_controls(prefix="menu/"))With the GUI open, run:
sh
flare-live-cli exec inspect_ui.pyUse the installed CLI path or an AppImage's --cli prefix. The embedded interpreter uses the Python packages bundled with Flare Live. flarelive_ui requires the GUI host and its render loop. The public GUI API version is 1, independent of product/RPC versions.
Only drawn registered controls are listed. Open a menu/reveal a panel/scroll before discovering hidden entries. Verify enabled state and unique occurrence; IDs/rectangles are observations, not permanent object references.
click/double_click/press_key/replace_text/move_pointer/mouse_wheel/drag operate the actual UI context. Text replacement needs a focused input. Pointer fractions within controls avoid manual DPI multiplication. Shortcuts act in the current focus context. Release custom held input in finally with release_input.
capture('/absolute/application.png') saves the application window's rendered content; capture_control crops a control. The directory must exist. Native dialogs, OS decorations and other windows are excluded. These write files on the GUI host, not return image bytes. Use Workspace export for scene-camera PNGs.
Check the shipped python/flarelive_ui.pyi and flarelive_ui.md for exact signatures/limits. A working desktop/render loop is required; disconnected RDP or blocked native dialogs can prevent progress. A timeout is not rollback, so inspect the original script job/current UI before repeating an edit.