• 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: Get List of Certain Desktop Filetypes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get List of Certain Desktop Filetypes


  • Subject: Re: Get List of Certain Desktop Filetypes
  • From: Nigel Garvey <email@hidden>
  • Date: Thu, 6 Dec 2001 00:47:52 +0000

Gnarlodious wrote on Wed, 05 Dec 2001 08:17:04 -0700:

>I am trying to get a list of specified filetypes on my Desktop:
>(Akua)
>tell application "Finder"
>set x to items in desktop whose file type is in ({"M822", "TEXT"} as alias)
> repeat with i in x
> open alias i
>
>ETC.
>
>What is the best/right way to do this? Because I get error "Can't make
>{"M822", "TEXT"} into a alias"

tell application "Finder"
try
set x to (items in desktop whose file type is in {"M822", "TEXT"})
as alias list
on error -- the Finder can't return an alias list if there's only one
item
set x to (items in desktop whose file type is in {"M822", "TEXT"})
as alias as list
end try
repeat with i in x
open i
end repeat
end tell

NG


  • Prev by Date: Re: List acting like a global
  • Next by Date: Re: AppleScript Studio...?
  • Previous by thread: Acrobat Scripting
  • Next by thread: Final Cut Pro 3
  • Index(es):
    • Date
    • Thread