Accessing dock icon right-click menu items with AppleScript

后端 未结 5 675
醉酒成梦
醉酒成梦 2020-12-16 23:39

Is there any way to get an AppleScript to access the menu items that come up when you right click on a dock icon?

Specifically, here\'s what I want to do:

I

5条回答
  •  别那么骄傲
    2020-12-17 00:35

    Alternatively you could also invoke this hidden option:

    defaults write com.apple.dock workspaces-auto-swoosh -bool NO
    killall Dock
    

    It also has the, for me, positive effect that you aren't thrown around on desktops anymore when switching applications. Simply do Cmd+N with Chrome as the active app.

    Btw you can go to spaces directly with Fn+1, Fn+2 etc. if you set it up instead of ⌃1, ⌃2 etc. You have to make the spaces before the keyboard shortcuts can be set in Keyboard -> Shortcuts preferences.

提交回复
热议问题