• 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: Questions questions...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions questions...


  • Subject: Re: Questions questions...
  • From: Kai Edwards <email@hidden>
  • Date: Wed, 13 Mar 2002 00:45:18 +0000

on Tue, 12 Mar 2002 16:37:59 -0600, mjn <email@hidden> wrote:

> It looks as though it is either a "whose" filter problem or Applescript is
> not understanding "creator type". I commented out "whose creator type is
> "NDSo"" and the script ran fine (except for not being able to delete the
> trash because of locked items).

I'm pleased to hear that the suggestion of a simpler line isolated the
problem for you. :-)

> Is there another way to check the creator value?

You could try going back to a repeat loop:

----------------------------------------------
tell application "Finder"
set fileList to (startup items folder)'s files
repeat with theFile in fileList
if theFile's creator type = "NDSo" then delete theFile
end repeat
end tell
----------------------------------------------

- which is a bit slow. For a bit of a speed bump, try this instead:

----------------------------------------------
tell application "Finder"
set fileList to (startup items folder)'s files
set delList to {}
repeat with theFile in fileList
if theFile's creator type = "NDSo" then [NO BREAK]
set delList's end to theFile
end repeat
delete delList
end tell
----------------------------------------------

HTH

Kai

--

**********************************
Kai Edwards Creative Resources
1 Compton Avenue Brighton UK
Telephone +44 (0)1273 326810
**********************************
_______________________________________________
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.

  • Prev by Date: Re: file size and creation date
  • Next by Date: Re: A Difference of Months
  • Previous by thread: Re: Questions questions...
  • Next by thread: Re: Questions questions...
  • Index(es):
    • Date
    • Thread