Re: Coercing from alias to original
Re: Coercing from alias to original
- Subject: Re: Coercing from alias to original
- From: "Adam K. Wuellner" <email@hidden>
- Date: Sun, 25 Apr 2004 16:10:25 -0500
On Apr 25, 2004, at 3:19 PM, Michael Vogt wrote:
I'm using Script Editor 2.0 (v43) and I'm writing a FolderAction.
The action:
on adding folder items to
f
creates an alias of folder f.
I'm wanting to count the number of items within folder f, but count
just sees the alias, and returns a value of 1.
How do I coerce the alias so that count can look at the actual folder
and figure out how much is inside?
(resending to list)
I think you need to count whatever 'f' contains, not 'f' itself:
tell application "Finder"
set folder_contents to every item of f
count f
end tell
I noticed that 'count (every item of f)' fails, I still haven't figured
out what's legal and what's not regarding nested statements.
HTH
--
Adam
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.