Created
June 3, 2021 16:08
-
-
Save indiscripts/8a920d3cbff0b568f35cc85d7b40add1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Assuming a text is selected (or cursor positioned) in a TextFrame. | |
// --- | |
var tf = app.selection[0].parentTextFrames[0]; | |
alert( tf.constructor.name ); // => TextFrame expected. | |
var dup = tf.duplicate(); // Duplicate the frame | |
dup.properties = { // Assign some props | |
contents:'test', | |
textFramePreferences:{ignoreWrap:true}, | |
locked:false | |
}; | |
dup.exportFile( ExportFormat.INDESIGN_SNIPPET, File("~/test.idms"), false ); | |
// => "The Specified Object does not support the desired export format" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment