如何使用 AppleScript 将窗口移动到某个桌面? [英] How to move a window to a certain desktop with AppleScript?
本文介绍了如何使用 AppleScript 将窗口移动到某个桌面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在桌面 1 (OS X Lion) 上有一个应用程序/窗口,我想将其移至桌面 3.有关如何执行此操作的任何见解?没什么大不了的,但如果可能的话,我想确保只有 3 个桌面可用.
I have an application/window on Desktop 1 (OS X Lion) and I'd like to move it to Desktop 3. Any insights on how to do this? Not as big a deal, but if possible I'd like to ensure there are 3 and only 3 Desktops available.
推荐答案
这个答案 应该提供有关如何做的线索放置应用程序,特别是...
This answer should offer clues on how to do place applications, specifically...
tell application "System Events"
set x to application bindings of spaces preferences of expose preferences
set x to {|com.apple.textedit|:4} & x -- Have TextEdit appear in space 4
set application bindings of spaces preferences of expose preferences to x
end tell
我认为移动窗口并没有太大不同.
I would imagine moving a window is not too different.
这篇关于如何使用 AppleScript 将窗口移动到某个桌面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文