Defaults Write Array-Add data type

I’m trying to add a dict - key - value to the end of an array using “do shell script” and the defaults command. It works, but strangely, I can’t seem to find the proper syntax to force the value to be an integer. Here’s the code:

defaults write com.mysoftware.mine knownPropList -array-add ‘colorDepth24’

That works, but I want the value (24) to be a number or an “int” but this code fails to work:

defaults write com.redstonesoftware.Vine knownVNCList -array-add ‘colorDepth24’

Anyone know the answer?

Try writing out instead of using . If that doesn’t work, then you’ll have to read it as a string and then coerce it to an integer before trying to use it.

j

works here…