Hello
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"
I did that with the application closed.
Alas, when I open the preference file, it contain the value NO.
It seems that a complementary action is required to force the change to be written on disk but I don't guess which one.
Of course it's not for my own use (I am able to use Property List Editor). But it's for an asker which is afraid to enter in the file by hand.
Yvan KOENIG (VALLAURIS, France) samedi 28 janvier 2012 17:38:36
|