【问题标题】:Applescript open new space in Mac OS SierraApplescript 在 Mac OS Sierra 中开辟新空间
【发布时间】:2017-04-12 03:59:41
【问题描述】:

我想在 Mac OS Sierra 中打开一个新的桌面/空间。对于 Alfred 工作流程。

我用我在这里找到的 Applescript sn-p 进行了尝试: Automator + Applescript how to: new Desktop (open Calendar and Reminders in it)

但这个似乎在 Mac OS Sierra 下不起作用。

我打开辅助功能检查器,发现有两个新组。 https://i.imgur.com/PwlWvmz.png

所以我尝试了这个:

tell process "Dock" to tell group 1 to tell group 1 to tell group 1 to tell button 1 to click`
end tell

但它没有点击按钮。也许有人可以帮助我。

【问题讨论】:

    标签: macos applescript macos-sierra


    【解决方案1】:

    我设法用以下脚本解决了它

    tell application "System Events" to click (every button whose value of 
    attribute "AXDescription" is "add desktop") of group "Spaces Bar" of 
    group 1 of group "Mission Control" of process "Dock"
    

    【讨论】:

      猜你喜欢
      • 2019-05-01
      • 2017-04-16
      • 2018-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-04-03
      • 2018-05-08
      相关资源
      最近更新 更多