Window-title conditions help

attempting to setup macro that throws 3 tabs when a titled-window within a specific app opens first the first time only.

where i’m encountering trouble:
when switching back to that same window, additional tabs are being thrown. are there conditions that would allow macro to function only when that titled window was initially-opened?
essentially looking to disable the macro until that titled-window is closed/opened again.

any help would be appreciated. i’m likely overlooking something very simple.

The macro can disable itself after it runs, then you can have a separate macro that is triggered when the application quits which re-enables the first macro. And you can have another macro that is active in that application, that is triggered when the focussed window changes, which detects when the WINDOWCOUNT function gets to zero and enables the first macro.