How do I make Restore Window Layout page agnostic?

I have a multistep Keyboard Shortcut that positions the windows of apps across multiple Mac Spaces. The way it basically works is

  1. Restore Window Layout on Space 1
  2. Move One Space Right
  3. Restore Window Layout on Space 2
  4. Move One Space Right
  5. Restore Window Layout on Space 3

As written, the app window positions are both app and window name dependent. For example here's the position code for one Space

[{"size":"{1253, 1415}","windowName":"Inbox","parentTitle":"Mimestream","position":"{1253, 25}","role":"AXWindow"},{"size":"{1254, 1415}","windowName":"New Tab - Google Chrome","parentTitle":"Chrome","position":"{0, 25}","role":"AXWindow"}]

I want the positions to take effect regardless of what the Title is of the app. Right now the script will only work if, in the case above, Chrome has a windowName of "New Tab - Google Chrome" and Mimestream has a windowName of "Inbox." I want the positioning to still work if Chrome has a different window (tab) open and if Mimestream has something besides Inbox selected.

Is that possible? Can I just take out the windowName pair or put some sort of wildcard in the name? I'm not a coder so I am not sure what I am looking at or what is possible.