您可以在Mac上使用Control +⬅️选项桌面。但有没有办法通过applescript创建一个新的桌面?

时间:2016-01-05 05:46:41

标签: macos applescript

您可以使用 Control + ⬅️到Mac上的选项桌面。但有没有办法通过 applescript 创建新桌面

1 个答案:

答案 0 :(得分:0)

this post的帮助下,这对我有用:

do shell script "/Applications/Mission\\ Control.app/Contents/MacOS/Mission\\ Control"

tell application "System Events" to tell process "Dock" to click button 1 of group 1

do shell script "/Applications/Mission\\ Control.app/Contents/MacOS/Mission\\ Control 1"

如果要激活新桌面:

do shell script "/Applications/Mission\\ Control.app/Contents/MacOS/Mission\\ Control"

tell application "System Events" to tell process "Dock"
    click button 1 of group 1
    click last button of list 1 of group 1
end tell