Im trying to store some PDF-export settings in the document as a label key string.
1) How do I convert the record to one string?
2) How do I convert the string back to a record?
I want the return-value in this code to be "Value2".
setmyPDFsettingRecordto {PDFsettingA:"value1", PDFsettingB:"value2", PDFsettingC:"value3"}
tellapplication "Adobe InDesign CC 2014"
tellactive document
-- store string in document
insert labelkey "PDFsettings" valuemyPDFsettingRecordasstring
-- read string in document
setPDFsettingstoextract labelkey "PDFsettings"
endtell
endtell
setPDFsettingstosplit(PDFsettings, ",")
returnPDFsettingAofPDFsettings
tosplit(someText, delimiter)
setAppleScript'stext item delimiterstodelimiter
setsomeTexttosomeText'stext items
setAppleScript'stext item delimitersto {""}
returnsomeText
endsplit