Hi @TechDevTeej,
This expression can be be replicated within a macro and then applied to the “Close” section of a Window’s settings menu:
To learn how to create a macro that can read or write from or to a device, please review our macro beginner tutorials: Link 1, Link 2
Note: To access a window’s settings menu, right-click a window in the windows tree and select “Settings”.