# Looking for quick 'Spaces' On/Off AppleScript or Automator widget



## Heart (Jan 16, 2001)

In Leopard you can enable Spaces On/Off in the System Preferences.. > Expose - Spaces > Spaces > Enable Spaces

And disable it there too. But that is a lot of clicks.

I only want to use 'Spaces' on my 12" PB when I do not have a 24" monitor attached to it. I would like to put something in the Menu / Dock / Desktop that I can single click or  if i must double click  for a quick on off.

I tried using the new 'Record' function in Automator... hmmm it seems to be guessing at locations on the screen, and errors out constantly. Maybe I need more practice.

If you see such a program around on the internet let this thread know.
thnx


----------



## hayesk (Mar 5, 2000)

What about the System Applescript dictionary? Does it have the control? I haven't installed Leopard yet, so I cannot check.

What I wish is that you define the size of your additional space and change the extra space into the second monitor when connected.


----------



## Heart (Jan 16, 2001)

hayesk said:


> What I wish is that you define the size of your additional space and change the extra space into the second monitor when connected.


That would be great. Treating two monitors not as one (1) Space and treat it as two (2) independent Spaces.

I will look into the applescript dictionary.


----------



## keebler27 (Jan 5, 2007)

hi,

sorry if i don't quite understand, but have you tried setting a keyboard shortcut? 
maybe that would work?

out of pure curiosity, why do you only want to use spaces on the lappie and not the 24"? just wondering to see if i can learn something new...

Cheers,
keebler


----------



## Heart (Jan 16, 2001)

Keep in mind I use a dual monitor setup 12" PB plus 24" Display.
Plenty of space. ( kind of like 3 feet worth of Desktop)
No need for spaces during the dual monitor setup.

In Spaces you can assign specific programs to a Spaces screen, when you switch to that program you swoop into another space. Both screens, Everything...

But when I move around, and unhook the second monitor.
That 12" is a small screen and is very very very useful in running multiple programs and keeping things organized.

As for the keyboard shortcut.
From what I can see there is no keyboard shortcut to turn Spaces ON/OFF.


----------



## krug1313 (Apr 27, 2007)

I have spaces on my menu bar right by my wireless connection. Would something like this work?


----------



## Heart (Jan 16, 2001)

krug1313 said:


> I have spaces on my menu bar right by my wireless connection. Would something like this work?


4 Clicks

Menu - Click 1
Dropdown to Open Spaces Preferences ... - Click 2
Enable/Desable toggle dot - Click 3
Close window - Command+W or Click 4

Its what I have been doing but I would like to double click a program in the dock and be done with it or with 2 Clicks hit a menu bar item.

I need a 50% to 75% reduction in clicks .


----------



## Chealion (Jan 16, 2001)

In an AppleScript run the following CLI lines:

defaults write com.apple.dock workspaces -bool NO
killall Dock

Change the NO to Yes to turn Spaces back on.

If you know AppleScript well enough you could just have it ask to turn off or on and use the response from the question box to fill in where the NO is.

I'd write the AppleScript but I'm late for work.


----------



## Skillet (Feb 2, 2010)

Try

tell application "System Events"
tell expose preferences
tell spaces preferences
set spaces enabled to true
end tell
end tell
end tell


----------



## Bjornbro (Feb 19, 2000)

Skillet said:


> Try...


I'm sure Heart appreciates your response_ three and half years after the fact._


----------



## Skillet (Feb 2, 2010)

Bjornbro said:


> I'm sure Heart appreciates your response_ three and half years after the fact._


I do what I can 

Really it was more of a post for someone that stumbles across the page like I did 3 1/2 years later. It drives me nuts on the apple forums how they archive everything and then no one can post or it is marked as answered when the answer didn't solve the problem, and don't allow others to respond. I am sure they have a grand reason but it frustrates me 90% of the time I go to those forums. Anywho that was my reasoning.


----------



## SINC (Feb 16, 2001)

I just don't get how new neighbours can dig up this dead stuff time and time again.


----------



## pm-r (May 17, 2009)

SINC said:


> I just don't get how new neighbours can dig up this dead stuff time and time again.


Probably the same way I did some years ago when Googling for info, and I believe how I discovered ehmac in the firs place.

But I will admit that I was a lurker for some time before I became a member around 2005-2006 but never really posted, and I had to sign up again when my first ehmac account went kapoof somehow in 2009.


----------

