Re: Repeats with list of just 1 file not working
Re: Repeats with list of just 1 file not working
- Subject: Re: Repeats with list of just 1 file not working
- From: "Stockly, Ed" <email@hidden>
- Date: Tue, 24 Apr 2007 11:38:29 -0700
- Thread-topic: Repeats with list of just 1 file not working
>>>> Can a repeat process a list of just 1 file? It should, right???!!!
> >>>Things seem to work fine if there are 2 or more files in the folder but the
repeat seems to be skipped if there is only 1 file.
The problem is that in Finder (and a few other apps) if your command returns
a single item you get a reference to that item, but if it returns multiple
items you get a list of references to those items. Someone suggested using
alias list, which may not work in all cases.
Here's what I use, which seems pretty bulletproof:
If the class of myListOfFiles in not list then
set myListOfFiles to {myListOfFiles}
End if
HTH,
ES
_______________________________________________
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