0

I'm using Slate window manager and I wanted a way to create a new space on El Capitan using script. I have found other solutions like the following, but it doesn't work on El Capitan.

list 1 would contain all the spaces, but add new desktop and I didn't find any list 2 which would contain add new desktop.

do shell script "open -a 'Mission Control'"
tell application "System Events" of list 1 of group 2 of group 1 of group 1 of process "Dock"

end tell
tell application "System Events" to key code 53

Thanks

1

I do not have Slate window manager installed however the following AppleScript code will add a new Desktop in Mission Control in a normal install of OS X El Capitan and other versions of OS X and macOS.

do shell script "open -a 'Mission Control'"
delay 0.5
tell application "System Events" to click (every button whose value of attribute "AXDescription" is "add desktop") of group 1 of process "Dock"
delay 0.5
tell application "System Events" to key code 53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .