I've got a window that always loads up in my app at position x=780.0, y=222.0
I've been trying lots of different ways to change the window size and position however when I use component.setString("AXPosition", {0,0})
I keep getting the following error: atomacos.errors.AXErrorFailure: There is some sort of system memory failure.
I must be doing something wrong but any advice would be appreciated.
If I use component.AXPosition = {0,0}
I get no errors but the position has still not changed, however if I use component.AXPosition = 0
or any number at all it always sets the position to x=0.0 y=1327.0 (the bottom left corner of my screen). ???
I've even tried a similar method to _converter.py in the repo but it still raises AXErrorFailure:
CGPoint=namedtuple("CGPoint", ("x", "y"))
from ApplicationServices import NSPointFromString
point = NSPointFromString("{x: 0, y: 0}")
component.AXPosition = CGPoint(point.x, point.y)
After a bit of digging, for those with a similar issue setting window sizes / positions this is the code: