Somebody just asked me a question about changing defaults. That triggered the next question on my side:
A shell command like
defaults read com.apple.TextEdit
yields
{
PMPrintingExpandedStateForPrint2 = 0;
UseEmbeddedCSS = 0;
UseInlineCSS = 1;
}
on my machine. That is an old style property list from the age of NeXTStep. The property list suite of System Events is still able to read that old style:
set x to "{
PMPrintingExpandedStateForPrint2 = 0;
UseEmbeddedCSS = 0;
UseInlineCSS = 1;
}"
tell application "System Events"
set y to make new property list item with properties {text:x}
set z to value of y
end tell
get z
returns the record “{UseInlineCSS:“1”, UseEmbeddedCSS:“0”, PMPrintingExpandedStateForPrint2:“0”}” which is almost OK. (The numbers are not recognized as such.)
Is there any way to cause System Events to produce that old style? “defaults” is not really happy with the “modern” XML style, it seems.
Regards, Jürgen