• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Repeats with list of just 1 file not working
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Repeats with list of just 1 file not working
      • From: Brett Conlon <email@hidden>
  • Prev by Date: automatically dismissing the OSX crash dialog?
  • Next by Date: Re: Script to replace lost file extension
  • Previous by thread: Re: Repeats with list of just 1 file not working
  • Next by thread: Re: Repeats with list of just 1 file not working
  • Index(es):
    • Date
    • Thread