Are you sure this should work when your client first starts up? What windows will your client replace if they are not already open at the first start?
In addition, there is an error in your example in setting the switches. Switches with the "-" and "+" sign must be separated by a space and they perform different actions with the inner part of the window and with its outer shell.
Could you describe in more detail what you would like to get and what result you expect from the created script?
More information is needed. It is advisable to describe the entire process from start to finish. Feel free to write a lot of text in your post.
This will help get into and think over all the details more thoroughly when creating a likely script for you. If of course there will be a possible solution to your problem.