Tengo un script que pasa valores a una lista, funciona bien, pero me gustaría cambiar algunos de los valores sin eliminar todo lo demás. Solía tener un script para eso pero no lo encontré en absoluto.
Aquí está mi script que crea el valor
tell application "System Events"
set the parent_dictionary to make new property list item with properties {kind:record}
set the plistfile_path to "~/Desktop/MY_DATA.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:string, name:"thename", value:theName}
make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:string, name:"creationDate", value:creationDate}
make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:string, name:"serialNumber", value:serialNumber}
make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:string, name:"Email", value:fullEmail}
make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:string, name:"IPAddress", value:IPAddress}
end tell
aquí está lo que escribí para cambiar el valor, pero el problema es que el plist solo tendrá el nuevo valor y todas las demás propiedades se eliminarán
set theName to "demo"
tell application "System Events"
set the parent_dictionary to make new property list item with properties {kind:record}
set the plistfile_path to "~/Desktop/MY_DATA.plist"
set this_plistfile to ¬
make new property list file with properties {contents:parent_dictionary, name:plistfile_path}
make new property list item at end of property list items of contents of this_plistfile ¬
with properties {kind:string, name:"thename", value:theName}
end tell
¿Cómo puedo cambiar parte del valor sin eliminar los demás?