Sunday, April 21, 2019

#1 2019-02-02 08:36:57 pm

ProGrammer
Member
Registered: 2016-12-16
Posts: 24

Toggle Mojave's Recent Apps in Dock with AppleScript

I would like to be able to toggle the Dock's Recent Applications section programmatically using AppleScript.

It works using:

Applescript:


do shell script "defaults write com.apple.dock show-recents -bool " & true
do shell script "killall Dock"

But I wonder what it's equivalent name is via Dock Preferences and System Events (more elegant), similar to:

Applescript:


tell application "System Events" to tell dock preferences to set magnification to true

"show-recents" is the name in the com.apple.dock plist file, but does not seem to work like this:

Applescript:


tell application "System Events" to tell dock preferences to set show-recents to true

Any help would be appreciated. Cheers.

UPDATE: Anybody?

Last edited by ProGrammer (2019-02-05 11:09:07 pm)


Filed under: dock, Mojave, recents

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)