• 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: Files of folder returns 0 ...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Files of folder returns 0 ...


  • Subject: Re: Files of folder returns 0 ...
  • From: Timothy Bates <email@hidden>
  • Date: Thu, 07 Feb 2002 11:41:47 +1100

Tried to fix the script by adding brackets to something that shouldn't need
brackets and, it turns out, doesn't)

tell application "Finder"
repeat with f in (files of folder "amygdala:Pictures:needfixing:")
set oldName to name of f as string
...
end
end

Run it and the result is ...

Script 3fix extensions2 started
tell application "Finder"
count every file of folder "amygdala:Pictures:needfixing:"
--> 0
end tell
Script 3fix extensions2 finished

So this is already non-OS9 compatible behaviour.

Then add the "get" coercion and it now works: But this is not needed under
OS9 AFAIK. And it is ugly. Your brain can no longer read the line as
"repeat with x in list" it has to do a reflexive parsing of
"repeat with x in (get a list)"

This is not necessary. So it is a limitation, if not a bug in the strict
sense of the word, IMHO.

Tim
_______________________________________________
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: 
 >Re: Files of folder returns 0 ... (From: email@hidden)

  • Prev by Date: Re: My Worrisome Lists :-)
  • Next by Date: Re: Hiding Apps
  • Previous by thread: Re: Files of folder returns 0 ...
  • Next by thread: Re: Files of folder returns 0 ...
  • Index(es):
    • Date
    • Thread