NotesやVLCなどの一部のアプリでは、次のものを使用できます。
tell application "Notes" to get the bounds of the window 1
上記の行をファイルに入れてsudo osascript thatfilename
それを呼び出すために使用すると、それは機能します。
しかし、Angry Birds Spaceなどの一部のアプリでは、次の機能が機能しませんか?
tell application "Angry Birds Space" to get the bounds of the window 1
エラーを出す:
execution error: Angry Birds Space got an error: Can’t get bounds of
window 1. (-1728)
それを妨げるそのアプリの特別な何かがありますか?(ゲームであるため、またはウィンドウ1がないためですか?)
bounds
一部のウィンドウのまたはのみを取得および設定することを検討してwidth
います(一部のウィンドウには特定のアスペクト比が必要なように見えるため、アスペクト比がない場合、特定の幅と高さに設定しても機能しない可能性があります)正しくありません)。