我知道,我可以使用 Apple 事件对象模型来移动和调整 Cocoa 应用程序的窗口大小。但是我可以将什么用于 Carbon 应用程序?
最佳答案
彼得是对的,您可以使用以下 AppleScript 访问任何窗口的边界:
tell application "System Events"
set allProcesses to application processes
repeat with i from 1 to count allProcesses
tell process i
repeat with x from 1 to (count windows)
position of window x
size of window x
end repeat
end tell
end repeat
end tell
关于macos - 如何从另一个应用程序以编程方式移动/调整窗口大小?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4231110/