• 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: Coercing an array of aliases to files
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coercing an array of aliases to files


  • Subject: Re: Coercing an array of aliases to files
  • From: Alex Zavatone <email@hidden>
  • Date: Tue, 09 Feb 2010 21:25:12 -0600


On Feb 9, 2010, at 8:59 PM, Deivy Petrescu wrote:

Alex,
if you post just few lines and do not explain what you want, it is going to be difficult to provide you with a good pointer.

You probably wanted something like

<script>
set afolder to path to "desk"
tell application "Finder" to set l to (every file of folder afolder whose name ends with ".png") as alias list
</script>


Deivy Petrescu
email@hidden

Thanks Deivy.  All I wanted to do was to see if there was a one line way of coercing an array (list) of aliases to an array of files.  I thought that was explanatory enough.

It turns out that you can't do that.

In the end, this is what I ended up doing:

set myItems to {}
repeat with myItem in someItems
set myNewItem to myItem as text
set the end of myItems to myNewItem
end repeat
 _______________________________________________
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: Coercing an array of aliases to files
      • From: Deivy Petrescu <email@hidden>
References: 
 >Re: Coercing an array of aliases to files (From: "Stockly, Ed" <email@hidden>)
 >Re: Coercing an array of aliases to files (From: Alex Zavatone <email@hidden>)
 >Re: Coercing an array of aliases to files (From: Deivy Petrescu <email@hidden>)

  • Prev by Date: Re: Coercing an array of aliases to files
  • Next by Date: Re: Coercing an array of aliases to files
  • Previous by thread: Re: Coercing an array of aliases to files
  • Next by thread: Re: Coercing an array of aliases to files
  • Index(es):
    • Date
    • Thread