Skip to content

accessAppWindow

Searches for an active window belonging to an original AC app, a Python app, or a Lua app. It returns an ac.AppWindowAccessor object used to control the window’s visibility, position, and rendering behavior.

Find a window by its display name.

local chat = ac.accessAppWindow("Chat")

The ac.accessAppWindow function acts as a bridge between your script and other apps running in the simulation. This is particularly good for creating custom HUD layouts or utility tools that manage the user’s workspace.

ParameterTypeRequiredDescription
windowNamestringYesThe exact name of the window as defined in its source.
TypeDescription
ac.AppWindowAccessorAn object providing methods to control the window. Returns nil if not found.

Finding the official ‘Chat’ app and ensuring it is hidden.

local chatWindow = ac.accessAppWindow("Chat")
if chatWindow and chatWindow:valid() then
chatWindow:setVisible(false)
end