AppleScript にて
最前面のウインドウの位置を取得するやり方
on run    
  tell application "System Events"
    set pList to name of every process whose frontmost is true
    set appName to item 1 of pList
    
    tell process appName
      set topWindow to window 1
      set topWindowSize to size of topWindow
      set topWindowPosition to position of topWindow
      
      -- 位置とサイズを表示
      set posStr to "位置:(" & item 1 of topWindowPosition ¬
        & ", " & item 2 of topWindowPosition & ¬
        "), サイズ:(" & item 1 of topWindowSize & ", " & item 2 of topWindowSize & ")"
      
      display dialog posStr
    end tell
  end tell
end run