Reading popup position on Perspective client

I m opening popup screen based on button script. If i move popup on screen at some other location. How to capture updated position of popup screen

I am using event properties e.g. clientX/ Client Y/ pageX etc

I am getting error if i read using x = event.pageX.IntVal()

Anybody can correct this code would welcome!!!

Hi,

After some testing on my end, there doesn’t seem to be a straightforward way to do this.

The error you’re getting from x = event.pageX.IntVal() is likely the following:

AttributeError: 'long' object has no attribute 'intValue'

If you just use event.pageX you’ll get the position, but typically this is the mouse position for that event, not the position of the page. There might be a way to indirectly find the popup window position from the mouse position, but I couldn’t get a method that would consistently work going as the window is resizable, can be dragged from any point of the popup in some situations, etc. I also didn’t find an exposed property that contained the current position of a popup window.

You can head on over to our Features and Ideas page to suggest adding this functionality to a future release as it seems like it could come in handy: Ignition Features and Ideas | Inductive Automation.