Re: Droplet
Re: Droplet
- Subject: Re: Droplet
- From: Mark Siple <email@hidden>
- Date: Wed, 05 Apr 2006 17:52:24 -0400
- Thread-topic: Droplet
How about this:
set a to {"folder:folder:", "file", "folder:", "folder:folder:file"}
set isfolders to {}
set isfiles to {}
repeat with fileorfolder in a
if fileorfolder ends with ":" then
set isfolders to isfolders & fileorfolder
else
set isfiles to isfiles & fileorfolder
end if
end repeat
It's still a loop but it wouldn't need to talk to the Finder so should be
faster. (Well... I think it should be faster!)
There's probably a way to combine "every item" and "ends with" to achieve
this but I can't seem to find it.
Mark.
On 4/5/06 5:13 PM, Michelle Steiner at email@hidden wrote:
> On Apr 5, 2006, at 1:20 PM, Robert Poland wrote:
>
>> Is this what you mean;
>>
>> repeat with i from 1 to the count of droppedItems
>> set currentItem to (item i of droppedItems)
>> tell application "Finder" to set theKind to kind of currentItem
>> if theKind is "Folder" then
>
> Well, that could do it; if kind is not Folder, then it has to be a
> file. But I was hoping that there's a way to do it without stepping
> through the list of items one by one, but that could generate two
> lists--one of files and one of folders, without a loop.
>
> -- Michelle
>
> --
> "Colorless green ideas sleep furiously."
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Applescript-users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
-----
Mark Siple <email@hidden>
Systems Administrator
The Columbus Dispatch
"Never ask a man what sort of computer he drives.
If it's a Mac, he'll tell you.
If not, why embarrass him?" -- Tom Clancy
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
- Follow-Ups:
- Re: Droplet
- From: "Automated Workflows, LLC Mailing Lists" <email@hidden>
References: | |
| >Re: Droplet (From: Michelle Steiner <email@hidden>) |