gdoubleod
gdoubleod

Reputation: 1308

Applescript and Flash Builder

I'm trying to get applescript to resize and move the windows of Flash Builder but I keep getting an error does anyone know how to get Eclipse or Flash Builder to play nicely with applescript?

For example:

tell application "Adobe Flash Builder 4.5"
    activate
    set the bounds of the first window to {-1680, 650, 0, 1050}
end tell

Returns this error:

tell application "Adobe Flash Builder 4.5"
    activate
    set bounds of window 1 to {-1680, 650, 0, 1050}
        --> error number -1708
Result:
error "Adobe Flash Builder 4.5 got an error: Can’t set bounds of window 1 to {-1680, 650, 0, 1050}." number -10006 from bounds of window 1

or maybe there is a way to do this in bash? :)

Upvotes: 2

Views: 533

Answers (2)

Patrick
Patrick

Reputation: 2363

As @philipregan mentions, it's because the app isn't scriptable. To find out if an application is scriptable, follow these instructions from apple.

To determine if a particular app is scriptable, see if it has a scripting dictionary. See Opening a Scripting Dictionary.

Source

Upvotes: 0

Philip Regan
Philip Regan

Reputation: 5045

You have two error codes at play here: -1708 and -10006.

-1708 is thrown when trying to script an application that isn't scriptable. -10006 is more generic but comes up when an object can't be set; you may not be able to set the bounds of a window via a script. Are you sure Flash Builder is actually scriptable?

Either way, bash won't help you out here. If the application doesn't support Open Scripting Architecture, there is little else you can do.

Upvotes: 2

Related Questions