• 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: Empty Record
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty Record


  • Subject: Re: Empty Record
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 15 Apr 2011 13:40:25 -0500

Thanks to all who commented. It has been a few days since I have been able to try your suggestions.
A few minutes of trying variations on a theme resulted in this handler which does exactly what I need ...

on makeNewPlistFile(folderAlias, filename, initialRecord) -- name of initialRecord is "xxx"
try
return ((folderAlias as text) & filename & ".plist") as alias -- the file already exists
end try
set newFilePath to (folderAlias as text) & filename
tell application "System Events"
set rootItem to make new property list item with properties {kind:record, value:initialRecord}
make new property list item at end of property list items of contents of rootItem with properties {kind:record, name:"yyy"}
make new property list file with properties {contents:rootItem, name:newFilePath}
return ((path of the result) as alias)
end tell
end makeNewPlistFile --------------------------------------------------------------------

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Empty Record (From: Luther Fuller <email@hidden>)
 >Re: Empty Record (From: Axel Luttgens <email@hidden>)
 >Re: Empty Record (From: Luther Fuller <email@hidden>)
 >Re: Empty Record (From: Axel Luttgens <email@hidden>)

  • Prev by Date: Re: Particulars of Finder Windows
  • Next by Date: Re: Script to Enable to root user
  • Previous by thread: Re: Empty Record
  • Next by thread: Re: Empty Record
  • Index(es):
    • Date
    • Thread