bounds of window idx of application "APPLICATION NAME"の値を参照することで、アプリケーションの持つウィンドウのうち、前からidx番目の大きさと位置(rectangle)を取得する事ができ、また上書きすることでウィンドウのサイズを制御することができる。idxを指定しない場合は全てのウィンドウのサイズのリストが返ってくるので、纏めて変更したい場合はこちらを使うと便利かもしれない。
以下に例として、前からidx番目にあるGoogle Chromeの幅をscale倍するsetScale関数を示す(ここでは最前面のウィンドウ幅を3倍に引き伸ばしている)。
on getCurrentSize(idx) bounds of the window idx of application "Google Chrome"end getCurrentSizeon setScale(idx, scale) set curSize to getCurrentSize(idx) set (item 3 of curSize) to (item 3 of curSize) * scale as integer set bounds of window idx of application "Google Chrome" to curSizeend setScalesetScale(1, 3)