Open popup on specific location after dragging, closing and re-open

Hi, I have a popup that I want to open on a floating position different from center. By unchecking the defaut option “and center” on compenent scripting it opens on the Location from the configuration of the window property (x=0,y=0 ) as expected. But if I drag the popup to another position, close it and re-open. It keeps the last position of were it was dragged and not the default configuration.

I have found this on documentation

"
Location The location that this window will open up at. Only applicable to floating windows that are not set to start maximized. Also, you must un-check the “Center Window” checkbox on the open-window navigation action in order for this location to take effect

Scripting name startingLocation


Data type Point
"

How do I set the “Point” Datatype?

I solved it and it was actually pretty easy. Just made 2 lines code on popup event handlers scripting on visionWindowOpened and Closed and it is:

window = system.gui.getParentWindow(event)
window.setLocation(0,0)

It’s hard to find out for beginners

3 Likes