I’m green at Applescript (at best). I wrote a script that opens System Preferences and then, with a second run of the same script, opens “Mission Control” on Yosemite. Both runs of the script produce an error dialogue box, “Can’t get menu item “View” of menu bar 1 of process System Preferences…”
But it does it what I want it to do: It opens Mission Control.
My goal is to display Mission Control to the user - with one run of the script - and then request the that user choose “As Space” in Dashboard (for this request, I can merely write a dialog box - so, no worries there). If the user doesn’t choose “as space,” then the script aborts. Another way to go: If the user chooses “as overlay” (in Dashboard) the script aborts (either “off” or “as space” - in Dashboard - works for me).
Is that possible? I’d be really grateful for any help…thank you in advance.
tell application “System Preferences”
tell application “System Events”
tell process “System Preferences”
click menu item “Mission Control” of menu “View” of menu bar 1
tell window “Mission Control”
click checkbox 1 of row 11 of table 1 of scroll area 1 of group 1