PIP and EQ2Bot

chemical77

Active Member
Hey all,

I wrote a little PIP script to have 5 PIP windows and 1 active emulated fullscreen window. Initially I had it in a PIP_DefaultStartup.iss file, which worked, but I have it in it's own newpip.iss file atm.

Anyway, the PIP'ing works as intended, allowing switching between the various windows, until I start EQ2Bot (I also tested with PIP'ing while running EQ2Harvest and EQ2AFKAlarm, just to see), but only EQ2Bot exhibits the issue:

If I start each session and run newpip on each of them, no problem. If I then start EQ2Bot on one of them and then click PIP windows to activate a different session, one of the newly PIP'd windows goes to windowpos 0,0 instead of it's defined PIP slot position.

I thought maybe the two scripts had conflicting variables so I prepended PIP_ to mine but still no change.

Here's newpip.iss:

Code:
function main()
{
  call initPIP
}

atom(globalkeep) PIP_OnActivate() 
{
  windowsize -viewable 1680x1050
  windowvisibility foreground
  windowframe none
  windowpos 0,0
}

atom(globalkeep) PIP_OnDeactivate() 
{
  #define PIP_SLOT_1 1390,10
  #define PIP_SLOT_2 1390,195
  #define PIP_SLOT_3 1390,380
  #define PIP_SLOT_4 1390,565
  #define PIP_SLOT_5 1390,750
 
  if ${Session.Equal[is1]}
    declare pip_pos string local PIP_SLOT_1
  if ${Session.Equal[is2]}
    declare pip_pos string local PIP_SLOT_2
  if ${Session.Equal[is3]}
    declare pip_pos string local PIP_SLOT_3 
  if ${Session.Equal[is4]}
    declare pip_pos string local PIP_SLOT_4
  if ${Session.Equal[is5]}
    declare pip_pos string local PIP_SLOT_5

  windowframe none
  windowsize -viewable 280x175
  windowvisibility alwaysontop
  echo "Setting PIP location to ${pip_pos}"
  windowpos ${pip_pos}
}

function initPIP()
{
  Event[On Activate]:AttachAtom[PIP_OnActivate]
  Event[On Deactivate]:AttachAtom[PIP_OnDeactivate]
}
Any ideas why running EQ2Bot would start causing one of my PIP windows to move to 0,0 instead of it's defined position? I tried looking through EQ2Bot code but didn't really see anything that would interfere.

Thanks for any advice / help / insight =D
 

chemical77

Active Member
So the problem was caused by EQ2BotLib changing the session name to the name of the character running EQ2Bot, which then doesn't match any of the conditions for PIP positioning.
 

chemical77

Active Member
I'd like the pip script to not care what the sessions are called and just dynamically alllocate PIP slots as they become available (when a session is activated and no longer using it).

The problem I'm having is that since 'On Deactivate' is an atom, which I believe it must be for an event, all deactivated windows see the same PIP slot as available at the same time and keep stacking on top of each other. I'm not sure how to influence the timing so that the deativated windows run through the position code in single-file instead of all at once.

I think that's why the original PIP scripts only used 'On Activate' and not 'On Deactivate': more control over timing. Then again, I don't understand how atoms truly execute, so I'll mess around some more and see if I can come up with something more elegant than the static positioning.
 
Top Bottom