• 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: Coerce to 'alias list'
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coerce to 'alias list'


  • Subject: Re: Coerce to 'alias list'
  • From: Walter Ian Kaye <email@hidden>
  • Date: Tue, 20 Jan 2004 19:57:14 -0800

At 07:18p -0800 01/20/2004, Walter Ian Kaye didst inscribe upon an electronic papyrus:

How would you get a list of aliases from a selection?

OK, I've just tested this on both 7.6.1 and 10.2.8, and with 0, 1, and multiple items selected:

GetFinderSelection()

on GetFinderSelection()
set selItems to {}
tell application "Finder"
copy selection to theSel
set selCount to count theSel
if selCount > 1 then
if (computer "sysv") > 4096 then
repeat with i from 1 to selCount
set end of selItems to (item i of theSel) as alias
end repeat
else --do the -1700 thang for 7/8/9
try
set selItems to {selection as alias}
on error number -1700 from f
set selItems to f
end try
end if
else if selCount = 1 then
set selItems to {selection as alias}
else
--already set selItems to {} at top
end if
end tell
selItems
end GetFinderSelection


-boo
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Coerce to 'alias list' (From: Jean-Baptiste <email@hidden>)
 >Re: Coerce to 'alias list' (From: Shane Stanley <email@hidden>)
 >Re: Coerce to 'alias list' (From: Walter Ian Kaye <email@hidden>)
 >Re: Coerce to 'alias list' (From: Michelle Steiner <email@hidden>)
 >Re: Coerce to 'alias list' (From: Walter Ian Kaye <email@hidden>)

  • Prev by Date: Re: Coerce to 'alias list'
  • Next by Date: Re: Coerce to 'alias list'
  • Previous by thread: Re: Coerce to 'alias list'
  • Next by thread: Re: Coerce to 'alias list'
  • Index(es):
    • Date
    • Thread