Dynamic Record Field Names
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