Skip to main content

Close all matching windows

Ask every visible window whose title matches to close (like clicking each X); programs may still ask to save.

Command in the Window toolkit · id ooa.window/close_all · 3 inputs, 2 outputs

Inputs​

InputTypeRequiredDefaultWhat it is
TitleStringNoText in the window titles, a pattern with * or ?, or re: and a regular expression (case-insensitive); the tick below reads the whole title as a regular expression, as older agents do. Empty: every window except those to keep (G4).
Title is a regular expressionBooleanNofalseTreat title as a regular expression.
KeepListNoWindows to leave open: text in their titles (case-insensitive), e.g. ["Invoices.xlsx"]. The agent's own windows are always kept.

Outputs​

OutputTypeWhat it is
closedListTitles of the windows asked to close.
countNumberNumber of windows asked to close.