我想知道在applescript中是否有可能创建一个脚本,我们将其作为输入提供应用程序名称和数字N,因此这个应用程序在Space的空格编号N中打开.
我想用这个来创建一个meta-applescript,所以当计算机启动和登录后,在每个空间我得到不同的应用程序,重要的是,我可以在脚本文件中更改它,而不是通过mac os x Space的首选项
谢谢
在OS X 10.5或10.6中,Spaces可以通过可编写脚本的界面访问和更改分配System Events.app:
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
Run Code Online (Sandbox Code Playgroud)
如果您还不知道,可以从Finder获取应用程序的软件包ID:
tell application "Finder"
get id of application file "TextEdit" of folder "Applications" of startup disk
end tell
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5483 次 |
| 最近记录: |