• 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: Finder Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Finder Question


  • Subject: Re: Finder Question
  • From: "Stockly, Ed" <email@hidden>
  • Date: Wed, 11 Jan 2017 21:55:24 +0000
  • Thread-topic: Finder Question

set urlList to {}

tell application "Finder" to set fileList to every item of someFolder as alias list

repeat with thisFile in fileList

tell application "Finder" to set the end of urlList to URL of thisFile

end repeat


It's a limitation of lists in appleScript. They don't respond to "every item" commands.



 


From: <applescript-users-bounces+ed.stockly=email@hidden> on behalf of "S. J. Cunningham" <email@hidden>
Date: Wednesday, January 11, 2017 at 12:01 PM
To: AppleScript Digest <email@hidden>
Subject: Finder Question

Why does the first method work and the second fail?  They seem equivalent to me.

-- Method 1
tell application "Finder" toset urlList to URL of every itemof someFolder

-- Method 2
tell application "Finder" toset fileList to every item of someFolder
tell application "Finder" toset urlList to URL of every itemof fileList


Steve
------------------
OS X 10.6.8, AppleScript 2.1.2

 _______________________________________________
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

References: 
 >Finder Question (From: "S. J. Cunningham" <email@hidden>)

  • Prev by Date: Re: Finder Question
  • Next by Date: Re: Finder Question
  • Previous by thread: Re: Finder Question
  • Next by thread: Indeed
  • Index(es):
    • Date
    • Thread