Perspective Script - Popup Relative Position

I have a popup that is opening via scripting that I'd like to open in a relative position, the same as selecting the relative option on the action configuration popup. How can this be accomplished?

This is where it would be handy to have that "action to script" functionality.

Thanks. Is there a way to enable/disable configured events based on a tag value?

I was doing this on a multi-state button, so I just used the onActionPerformed configurator to configure a popup to open in a relative position.

Then, to "disable" the popup, I duplicated the multi-state button. It looks like the popup is disabled, but really the multi-state button is replaced entirely with one that does not have a popup.