Mac OS X - 以编程方式调整窗口大小

ryy*_*yst 6 macos cocoa

我想知道像应用程序如何瓜分,莲花,SizeUp等调整属于其它应用程序/移动窗口?我知道这可能涉及私有API.或者他们都使用AppleScript?那里有关于怎么做的资源吗?

Jef*_*ley 7

前阵子我写了一篇关于使用AppleScript来做到这一点.基本上,请执行以下操作:

tell application "MyApp"
    set the bounds of the first window to {x, y, width, height}
end tell
Run Code Online (Sandbox Code Playgroud)