如何从控制台定位应用程序的窗口,只使用它的processID?
我尝试了许多变体,但没有运气。
tell application "System Events"
set position of front window of process "32209" to {1, 1}
end tell发布于 2017-03-10 18:49:52
这对我来说很管用:
set pid to "32209"
tell application "System Events"
set proc to item 1 of (processes whose unix id is pid)
tell proc
set position of front window to {1, 1}
end tell
end tell确保使用正确的进程ID。
更新(基于下面的评论)
若要移动属于应用程序的所有窗口,请更改
set position of front window to {1, 1}至
set position of every window to {1, 1}https://stackoverflow.com/questions/42713095
复制相似问题