For a Button object named myButton, use the following syntax:
var pos = myButton.GetPosition()var PosX = pos.xvar PosY = pos.y