• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Get list of desktops?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get list of desktops?


  • Subject: Re: Get list of desktops?
  • From: Axel Luttgens <email@hidden>
  • Date: Thu, 18 Jul 2013 18:02:27 +0200

Le 18 juil. 2013 à 16:20, Alex Zavatone a écrit :

> [...]
>
> tell application "System Events"
> 	get every desktop
> 		--> {desktop "69677952", desktop "69503829"}
> 	get change interval of desktop "69677952"
> 		--> error number -10002 from «class dskp» "69677952"
> error "System Events got an error: Invalid key form." number -10002 from desktop "69677952"

Hello Alex,

Here on 10.8, desktop ids are numeric, and get every desktop would return something like:

	--> {desktop id 69677952, desktop id 69503829}

Which OS version are you running?

Should it be anyway of some help in your case, this one seems fine (even if a bit verbose) here:

	tell application "System Events"
		tell (first desktop whose id is 69503829)
			get change interval
			-- more get/set stuff
		end tell
	end tell


> What's the proper method to getting the list of desktops and walking it?

Yvan already suggested a way.
Should it be working for you, here's a slightly different one:

	tell application "System Events"
		repeat with D in desktops
			tell D
				get change interval
				-- more get/set stuff
			end tell
		end repeat
	end tell

HTH,
Axel




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


  • Follow-Ups:
    • Re: Get list of desktops?
      • From: Alex Zavatone <email@hidden>
References: 
 >Get list of desktops? (From: Alex Zavatone <email@hidden>)

  • Prev by Date: Re: Get list of desktops?
  • Next by Date: Re: Get list of desktops?
  • Previous by thread: Re: Get list of desktops?
  • Next by thread: Re: Get list of desktops?
  • Index(es):
    • Date
    • Thread