[ad_1]
Instead of
Application("Preview").windows[0].bounds = {"x": 1440, "y":25, "width":1440, "height": 2535}
I’d like to move the window but instead of using an index, I’d like to use the window’s ID. I got the ID with
Application("Preview").windows[0].id();
But when I replace the index with the ID:
Application("Preview").windows.whose({id: 15596}).bounds = {"x": 1440, "y":25, "width":1440, "height": 2535}
I get
Error -1728: Can’t get object.
[ad_2]