• 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:Icon bounds on the destop
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re:Icon bounds on the destop


  • Subject: Re:Icon bounds on the destop
  • From: John Baltutis <email@hidden>
  • Date: Fri, 17 Dec 2010 17:23:19 -0800

On 12/17/10, Ronald Hofmann <email@hidden> wrote:
>
> I want to get the positions of the icons which are on the desktop.
> I tried to use "bounds" but this is obviously wrong because all icons get the
>same value.
>
> Any hints how to do this?

The problem I see with the previous solutions is that they get all the names
and then all the postitions. Try this one, which pairs the name with its
position:

tellapplication "Finder"
	set theResultList to {}
	set theCount to (count of items of desktop)
	repeat with i from 1 to theCount
		set theResultList to theResultList & {{name, desktop position} of item
i of desktop}
	end repeat
end tell
 _______________________________________________
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: Icon bounds on the destop
      • From: Ronald Hofmann <email@hidden>
  • Prev by Date: Re: Display Dialog
  • Next by Date: Re: Icon bounds on the destop
  • Previous by thread: [ann] Ruby appscript 0.6.0 released
  • Next by thread: Re: Icon bounds on the destop
  • Index(es):
    • Date
    • Thread