AppleScript アップルスクリプト 質問、発表 6at MAC
AppleScript アップルスクリプト 質問、発表 6 - 暇つぶし2ch999:名称未設定
17/03/09 11:55:01.56 r10Q2kpv0.net
表示しているウィンドウを画面の中央に移動するAppleScript教えてください

検索して以下を試してみたけどSierraでは動かなかったです・・・

tell application "Finder" to set ScreenSz to bounds of window of desktop --- ディスプレイの解像度を取得する。
tell ScreenSz to set {ScreenSz3, ScreenSz4} to {item 3, item 4}

tell application "System Events"
set ActApp to name of every process whose frontmost is true --- アクティブなアプリを取得する。
set ActApp to item 1 of ActApp
tell process ActApp
tell window 1
set CurentSz to size --- アクティブなウインドウの縦横のサイズを取得する。
set x to (ScreenSz3 - (item 1 of CurentSz)) / 2
set y to (ScreenSz4 - (item 2 of CurentSz)) / 2
set position to {x, y} --- ウインドウの位置を移動する。
end tell
end tell
end tell


次ページ
続きを表示
1を表示
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch