Re: setting a preference with do Shell Script
Re: setting a preference with do Shell Script
- Subject: Re: setting a preference with do Shell Script
- From: Doug McNutt <email@hidden>
- Date: Sat, 28 Jan 2012 10:14:45 -0700
At 17:41 +0100 1/28/12, KOENIG Yvan wrote:
>I'm trying to use a script to change a preference setting.
>It's the preference FormatXML dedicated to Pages, an iWork application.
>
>The default setting is NO but I wish to set it to YES.
>
>I thought that
>
>do shell script "defaults write com.apple.iWork.Pages FormatXML -string YES"
>
>would do the trick.
>
>It seems to do because if I run
>
>do shell script "defaults read com.apple.iWork.Pages FormatXML"
>
>do shell script "defaults write com.apple.iWork.Pages FormatXML -string YES"
>
>do shell script "defaults read com.apple.iWork.Pages FormatXML"
>
>
>the log report claim :
>--> "NO"
>--> ""
>--> "YES"
SNIP by DPM
Those do shell script lines may need some quoting, "quoted from of" style.
It just might be that defaults read and write are going to some new file that has nothing to do with :
"com.apple.iWork.Pages FormatXML" or com.apple.iWork.Pages\ FormatXML
Modification date/time for the file?
Are you in the users Library directory? Or in the system side of things with proper access permissions?
--
Applescript syntax is like English spelling:
Roughly, though not thoroughly, thought through.
_______________________________________________
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