Autorun actions on new windows

It would be nice to have a feature that autoruns actions when a new window opens up.

E.G auto maximize an app or snap to area when it opens up.

Another example is Finder that opens windows in different areas and I usually do "Merge All Windows" to reorder it. - an autorun feature would assist in decluttering in this instance.

Note: I tried using the CAG activated trigger but that runs on every activation of the app, not just the first time.