Palette Positions

Any advice - I would like to have a palette open in the position of the previous palette.

ie. Palette 'A' is open.
It has an icon to close palette 'A' and open palette 'B'.
I would like palette 'B' to find and open where palette 'A' was.

I'm trying to use the Get Palette Position and Move Palette plugins, but I'm stumped with the variable formatting.