• 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: "koenig.yvan" <email@hidden>
  • Date: Fri, 19 Jul 2013 17:45:48 +0200


Le 19/07/2013 à 12:25, koenig.yvan <email@hidden> a écrit :


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

Hello

I made complementary tests.


set tempID to item x of temp as integer

may be replaced by :
set tempID to contents of item x of temp

and/or by
set tempID to item x of temp

All tests made with 10.8.4 French localisation.

KOENIG Yvan (VALLAURIS, France) vendredi 19 juillet 2013 17:45:43



 _______________________________________________
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: Small Problem vs Tip of Iceberg
  • Next by Date: Re: Small Problem vs Tip of Iceberg
  • Previous by thread: Re: Get list of desktops?
  • Next by thread: Re: Get list of desktops?
  • Index(es):
    • Date
    • Thread