When 'On Activate' is triggered, it affects a single window. When 'On Deactivate' is used, potentially multiple windows are affected at the same time.
PiP is the example. If I write a pip script that contains code to place multiple deactivated windows in various places on screen, they all execute the atom at the same time and, if there's a condition in the atom to use certain pip locations first, all deactivated windows see the first location as available at the same time, and the pip windows end up stacking on top of each other in the same place.
If I create an identifier for each window (session or something else) then the pip windows are statically assigned onscreen positions and won't fill empty pip slots that may have been made available earlier, so you end up with gaps in the pip window 'list'.
Not really a syntax question, but rather design. I do have a working pip script for 6-boxing, working on the UI and LavishSettings now. The script is fired off from a game configuration but does not run in a loop. It sets some variables and then activates a global atom (On Activate only, no On Deactivate since I couldn't get the timing issue resolved).
The problem I have is that I don't know how to position the multiple deactivated windows inside an 'On Deactive' atom (since they all see the first pip position as available at the same time and stack there).
How to best accomplish this? Any advice would be helpful
