• 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: Alex Zavatone <email@hidden>
  • Date: Fri, 19 Jul 2013 10:57:02 -0400


On Jul 19, 2013, at 6:25 AM, koenig.yvan wrote:


Le 19/07/2013 à 12:16, Brian Christmas <email@hidden> a écrit :

I just altered the code, and it errorred. I reset it back, and it still errorred.

So I tried it in an error trap, and it worked.

Please try this code snippet.. tested under 10.8.4, new iMac i7


try
tell application "System Events"
get properties of desktop
end tell
on error
tell application "System Events"
set temp to id of every desktop as list
repeat with x from 1 to count of temp
set tempID to item x of temp as integer
get properties of desktop id tempID
end repeat
end tell
end try

>>>> {display name:"iMac", id:69992768, change interval:5.0, name:"iMac", picture:file "Brian's Disk:Users:ozsanta:Pictures:iPhoto Library:Masters:2013:04:02:20130402-092028:IMG_6452.JPG", class:desktop, pictures folder:file "Brian's Disk:Users:ozsanta:Library:Caches:com.apple.preference.desktopscreeneffect.desktop:69992768:DSKiPhotoRootSource-4q19HK5FQXCWo8Lcrz4JLA:", translucent menu bar:false, random order:false, picture rotation:1}

Good point.
May be edited a bit :

tell application "System Events"
get properties of every desktop
set temp to id of every desktop as list
repeat with x from 1 to count of temp
set tempID to item x of temp as integer
get properties of desktop id tempID
end repeat
end tell

KOENIG Yvan (VALLAURIS, France) vendredi 19 juillet 2013 12:25:18

Mac OS 10.8.3:
error "System Events got an error: Invalid key form." number -10002 from desktop id 1.535231424E+9

 _______________________________________________
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

References: 
 >Fwd: Get list of desktops? (From: "koenig.yvan" <email@hidden>)
 >Re: Get list of desktops? (From: Alex Zavatone <email@hidden>)
 >Re: Get list of desktops? (From: "koenig.yvan" <email@hidden>)
 >Re: Get list of desktops? (From: Alex Zavatone <email@hidden>)
 >Re: Get list of desktops? (From: Alex Zavatone <email@hidden>)
 >Re: Get list of desktops? (From: Brian Christmas <email@hidden>)
 >Re: Get list of desktops? (From: "koenig.yvan" <email@hidden>)
 >Re: Get list of desktops? (From: Brian Christmas <email@hidden>)
 >Re: Get list of desktops? (From: "koenig.yvan" <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