Toggling the state of Spaces (on Leopard) ?

Hi

Is there a way to enable/disable Spaces via AppleScript? Or some other way I can hook up to a keyboard shortcut? (I’m using the wonderful iKey)

Thanks
Guy

Hi Guy,

Indeed, there are amazing improvements in the dictionary of System Events to script System Preferences

tell application "System Events"
	tell spaces preferences of expose preferences to set spaces enabled to true -- or false
end tell

Thanks!

Though for toggling I’d just use:

tell application "System Events" to tell spaces preferences of expose preferences to set spaces enabled to (not spaces enabled)