It's not exactly checking for new windows, but one of the easier ways to do this is to check the front window's current position (or size, or frame, depending on what the manipulation involves) and manipulate it only if it isn't set up how you want:
If this doesn't satisfy your use case, please follow the tips listed here: Tip: How Do I Get The Best Answer in the Shortest Time?
and post again with more details and an upload your current macro.