Re: Finder Question
Re: Finder Question
- Subject: Re: Finder Question
- From: Christopher Stone <email@hidden>
- Date: Wed, 11 Jan 2017 15:39:22 -0600
On Jan 11, 2017, at 14:01, S. J. Cunningham <email@hidden> wrote:
Why does the first method work and the second fail? They seem equivalent to me.
Not really.
(Although I thought the same thing long ago.) -- Method 1 tell application "Finder" to set urlList to URL of every item of someFolder
Talking to the folder and creating a list of Finder-References.
Quite appropriately.
Although Finder-References are generally useless and slow – it's faster and better to get as alias list.
tell application "Finder" tell front window set l to items as alias list end tell end tell -- Method 2 tell application "Finder" to set fileList to every item of someFolder
Talking to the folder and creating a list of Finder-References. tell application "Finder" to set urlList to URL of every item of fileList
THEN – talking to the list-object of Finder-References – NOT the Finder-Folder-Object.
You're not actually talking to the Finder anymore, although the Finder-Tell-Block is fooling you into thinking that you are.
Make more sense?
|
_______________________________________________
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