Re: Is this a bug?
Re: Is this a bug?
- Subject: Re: Is this a bug?
- From: Deivy Marck Petrescu <email@hidden>
- Date: Sun, 15 Mar 2009 19:08:51 -0400
On Mar 15, 2009, at 6:48 PM, KOENIG Yvan wrote:
As I don't have disks with same name, I tested with:
set ky to "Maxtor"
tell application "Finder"
set d to get item 1 of (every disk whose name starts with ky)
set l to every disk whose name starts with ky
set m to get item 1 of l
end tell
return {d, l, m}
Under 10.4.11 I got the logical:
{{folder "Desktop" of disk "Maxtor 2" of application "Finder",
folder "Desktop" of disk "Maxtor 3" of application "Finder", folder
"Contents" of disk "Maxtor 4" of application "Finder"},
{disk "Maxtor 2" of application "Finder", disk "Maxtor 3" of
application "Finder", disk "Maxtor 4" of application "Finder"},
disk "Maxtor 2" of application "Finder"}
Yvan KOENIG (from FRANCE dimanche 15 mars 2009 23:48:40)
Yvan, that is not logical. At least if you take into account AS
behavior.
But it is very welcome!
look
<script>
tell application "Finder" to get item 1 of disk "deivy"
set l to {{1, 2}, {3, 4}, {5, 6}}
return item 1 of (every item of l)
</script>
on the events window:
tell application "Finder"
get item 1 of disk "deivy"
--> folder "Desktop" of disk "deivy"
end tell
on the results window
-->{1, 2}
So one can get the item 1 f every single item of the list generated by
the "Finder".
This is great.
I was not aware of that!
Deivy Petrescu
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