• 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
Dynamic Record Field Names
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Dynamic Record Field Names


  • Subject: Dynamic Record Field Names
  • From: Gary Beberman <email@hidden>
  • Date: Wed, 31 May 2006 22:23:57 -0700

I am trying to keep count of file types in a directory. To do so, I would love to be able to dynamically assign field names in a record based on the file type. This is the idea:

set WhichFolder to choose folder
set TypeCount to {}

tell application "Finder"
    set flist to every file of WhichFolder
    repeat with TheFile in Flist
      set ftype to (file type of TheFile)
      try
          set ftype of TypeCount to ftype of TypeCount + 1
      on error
          set TypeCount to TypeCount & ftype:1
      end try
    end repeat
end tell

Obviously this won't work. I would love a way to dynamically refer to and create field names in the record.

Any ideas?

Thanks,

Gary
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Dynamic Record Field Names
      • From: Malcolm Fitzgerald <email@hidden>
References: 
 >posix path argument (From: Nir Soffer <email@hidden>)
 >Re: posix path argument (From: Nir Soffer <email@hidden>)

  • Prev by Date: Changing File Names
  • Next by Date: Re: Dynamic Record Field Names
  • Previous by thread: Re: posix path argument
  • Next by thread: Re: Dynamic Record Field Names
  • Index(es):
    • Date
    • Thread