My script below below works if System Preferences was closed with the Expose (called Main) anchor of the Expose pane already revealed. However, it won’t reveal that pane. (ha, I just typoed pain)…any clue as to why?
-->shut off dashboard
tell application "System Preferences"
activate
set the current pane to pane id "com.apple.preference.expose"
--return name of every anchor of pane id "com.apple.preference.expose"
reveal anchor "Main" of pane id "com.apple.preference.expose"
tell application "System Events"
tell process "System Preferences"
tell group 2 of tab group 1 of window 1
click pop up button 4
click menu item "-" of menu 1 of pop up button 4
end tell
end tell
end tell
end tell
Browser: Firefox 3.0.4
Operating System: Mac OS X (10.5)