• 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 23:27:18 -0600


On Feb 9, 2010, at 10:35 PM, Deivy Petrescu wrote:


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
Alex,

The list above is a list of strings.

When you say  you want to coerce an array (list) of aliases to an array of files then either you can't, because an (Finder) alias is not technically a file, or, you do not need to because an alias could a file (or a folder, or a disk).

In my example above all the aliases are files.


Deivy Petrescu
email@hidden

I ended up finding that the text strings were easier to work with and the aliases were only able to be coerced to be certain types.  I was expecting to get a file property and surprisingly, the alias was not able to do that (no idea why), so text it was.  

It's solved, thanks.

 _______________________________________________
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: 
 >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>)
 >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: Stuffit Deluxe not applescriptable in 10.6.2
  • 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