Switch Spaces Programmatically?

  • 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?

    Thanks,
    Topher
  • On Nov 2, 2007, at 10:18 AM, 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, there is no API to switch spaces.

    -eric
  • 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                      <gandreas...>
      <http://www.gandreas.com/> wicked fun!
    quadrium | prime : build, mutate, evolve, animate : the next
    generation of fractal art
previous month november 2007 next month
MTWTFSS
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    
Go to today