Need Help with System preferences & Applescript

Discussion in 'Mac Programming' started by lynkynpark86, Apr 24, 2010.

  1. lynkynpark86 macrumors 6502

    I am making an application that needs to know if the user has Spaces activated, and if so how many Spaces they have. I have spent hours trying to figure this out, first from other websites, then on my own, and nothing works. Please help!!! :apple:
  2. chown33 macrumors 604

    Aug 9, 2009
    Sailing beyond the sunset
    Exactly how did you go about looking for information?

    I entered what seemed like an obvious set of keywords to google: mac os spaces terminal command

    In the search results, this was the 4th hit:
    I confirmed the information by enabling & disabling Spaces, and reading the plist file with Property List Editor.

    To discover the values associated with Spaces row and column count, change the default using System Preferences, then re-read the plist file. Same procedure for discovering which space is occupied by which apps.

    I chose the search keywords to include spaces for the obvious reason, and terminal command because I thought it's more likely an answer is going to involve a Terminal command, rather than an actual AppleScript scripting element or a GUI app. Why? Because who but a programmer would even want this capability, and the first tool most programmers think of making is a command-line tool.

Share This Page