Window restrictions set in a window using AppleScript in OS X are ignored

I am trying to create a little AppleScript to create and move some terminal windows on my screen. The problem I am facing is that in some cases, it seems that OS X is ignoring the boundaries that I set.

Using the AppleScript Editor:

tell application "Terminal" to set the bounds of the first window to {0, 50, 600, 700}
tell application "Terminal" to get the bounds of the first window

Shows the following in the event log:

tell application "Terminal"
    activate
    set bounds of window 1 to {0, 50, 600, 700}
    get bounds of window 1
        --> {0, 22, 600, 672}
end tell
Result:
{0, 22, 600, 672}

A visual inspection of the window created when the script was run shows that the borders of the results are those used by the window.

Any ideas?

Edit: launch 10.6.3. My screen size is 1280 X 800. The Finder reports the borders of the desktop window as {0, 0, 1280, 800}

+5
source share
3

. , , " " :

# from my window tiling script:
set the bounds of the first window to {0, 22, (screenWidth / 2), screenHeight}
set position of the first window to {0, 22}
+4

, , , , :

tell application "System Events" to tell process "Live"
    set position of window 1 to {0, 50}
    set size of window 1 to {600, 650}
end tell
+3

. mavericks , . , :

... {...,..}, .. {..,..}

0

All Articles