Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Scripting
Viewing all articles
Browse latest Browse all 15932

[AS] storing records in the document

$
0
0

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


Viewing all articles
Browse latest Browse all 15932

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>