• 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: Using Defaults to Manipulate NSHumanReadableCopyright
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using Defaults to Manipulate NSHumanReadableCopyright


  • Subject: Re: Using Defaults to Manipulate NSHumanReadableCopyright
  • From: Shane Stanley <email@hidden>
  • Date: Tue, 13 Sep 2011 23:17:09 +1000

On Sep 13, 2011, at 10:44 PM, Luther Fuller wrote:
There is an alternative to using 'defaults write ...'.

More than one, in fact. In AppleScriptObjC:

-- read file into dictionary/record
tell current application's NSMutableDictionary to set theProps to ¬
dictionaryWithContentsOfFile_("/path/to/file.plist")
-- treat it like a normal record
set theProps to {NSHumanReadableCopyright:"© Jane Doe"} & (theProps as record)
-- write to file
tell theProps to writeToFile_("/path/to/file.plist", true)

-- 
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>

 _______________________________________________
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: 
 >Using Defaults to Manipulate NSHumanReadableCopyright (From: Jim Thorton <email@hidden>)
 >Re: Using Defaults to Manipulate NSHumanReadableCopyright (From: Luther Fuller <email@hidden>)

  • Prev by Date: Re: Using Defaults to Manipulate NSHumanReadableCopyright
  • Next by Date: Passing a Handler at Runtime
  • Previous by thread: Re: Using Defaults to Manipulate NSHumanReadableCopyright
  • Next by thread: Passing a Handler at Runtime
  • Index(es):
    • Date
    • Thread