Skip navigation.
 
mlRe: Switch Spaces Programmatically?
FROM : glenn andreas
DATE : Fri Nov 02 18:40:20 2007

On Nov 2, 2007, at 12:18 PM, Christopher Hickman wrote:

> Hi All,
>
> I've searched through the release notes, but I can't find a method 
> to call the switch spaces programmatically.  Is there no API for this?



No, nor does there appear to be a good way to tell what the current 
Space is (which at least is symmetric)

You can, however, use the AppleScript bridge to talk to the System 
Events app to find out things such as the Spaces width and height, 
turn it on and off, as well as finding out if the user has enabled a 
keyboard modifier to allow using the number key navigation, and, if 
so, you can use the low level CG routines to post the corresponding 
key down/up events.

Of course, if the user doesn't have that enabled, there's nothing you 
can do (plus, the scripting bridge has a problem with fact that the 
key modifiers can be either a string or a list and appears to generate 
code for a single item, when a list is actually returned).

(That being said, the AppleScript bridge is _really_ cool...)


Glenn Andreas                      <email_removed>
  <http://www.gandreas.com/> wicked fun!
quadrium | prime : build, mutate, evolve, animate : the next 
generation of fractal art

Related mailsAuthorDate
mlSwitch Spaces Programmatically? Christopher Hickma… Nov 2, 18:18
mlRe: Switch Spaces Programmatically? Eric Schlegel Nov 2, 18:32
mlRe: Switch Spaces Programmatically? glenn andreas Nov 2, 18:40