Using Applescript to position Xojo windows

I’m trying to get xojo to position its window on my 3rd screen, using an applescript.

‘tell application “Xojo” to set the bound of the front window to {1440, -461, 3359, 618}’

Running that using Shell:
osacript - a ‘tell application “Xojo” to set the bound of the front window to {1440, -461, 3359, 618}’

Running this while debugging my project, Shell returns this result:

27:85: execution error: Xojo got an error: Can’t set bounds of window 1 to {1440, -461, 3359, 618}. (-10006)

This applescript:
tell application “Finder” to get the bounds of the window of the desktop
Reports:
{-1920, -471, 3360, 900}

Which suggests the bounds specified are within the valid range.

I just ran it again, and it made my 2nd screen turn black. Maybe there is something really haywire with my application.

I am wondering if anyone knows whether xojo responds as one would expect to the bounds setting.

BTW I’m using Xojo 2015 R3.1

You can test things by recording them in Script Editor.
Xojo is not AppleScript-able.

OK thanks Tim
Didn’t know it wasn’t.

You can view a list of things you can AppleScript in your /Applications/ folder by going to File > Open Dictionary
This is also the reference documentation so you don’t have to guess how things work.

Yes its not in the dictionary and browsing, won’t let you open xojo. So no sdef file I presume

Oddly, this works:

tell application “Xojo” to quit

Because “Quit” is a standard function that’s handled by default. There’s a couple more, I think open, new, activate, hide, show. For everything else there’s mastercard.

From the Cocoa Scripting Guide:

The Xojo IDE could be made scriptable now with my new scriptable classes, which provide the entire Cocoa Scripting API in Xojo now. But I doubt Xojo is having any resources for doing that, ever.

Also, this should not be posted in Geneal but in Targets/OSX probably.