Window bounds set on window using AppleScript in OS X are being ignored
Posted
by Jesse
on Stack Overflow
See other posts from Stack Overflow
or by Jesse
Published on 2010-05-06T01:43:40Z
Indexed on
2010/05/06
1:48 UTC
Read the original article
Hit count: 254
applescript
|osx
I am trying to create a small AppleScript to create and move some Terminal windows around my screen. The problem I am running into is that in some cases, it seems that OS X is ignoring the bounds I am setting.
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}
Visually inspecting the window that is created when the script runs shows that Result bounds are the ones being used by the window.
Any ideas?
© Stack Overflow or respective owner