Re: Icon bounds on the destop
Re: Icon bounds on the destop
- Subject: Re: Icon bounds on the destop
- From: Ronald Hofmann <email@hidden>
- Date: Sat, 18 Dec 2010 07:46:45 +0100
Thanks to all for the help with my small project.
What I did:
I made a Desktop_Getter which writes the position of all current Desktop Icons into a file.
My Desktop_Setter reads the positions from this file and sets the icons to the proper positions.
Greetings, Ronald
---
Am 18.12.2010 um 02:23 schrieb John Baltutis:
> 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
_______________________________________________
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