Created
March 5, 2014 14:59
-
-
Save milligramme/9368861 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
#target "indesign" | |
function boooxed (object_style_name) { | |
if (app.selection.length !== 1) return | |
var doc = app.documents[0]; | |
var sel = doc.selection[0]; | |
if ('baseline' in sel) { | |
var bx = sel.insertionPoints[0].textFrames.add(); | |
bx.appliedObjectStyle = doc.objectStyles.item(object_style_name); | |
bx.geometricBounds = [0,0,5,30]; | |
sel.duplicate(LocationOptions.AT_END, bx.parentStory); | |
bx.fit(FitOptions.FRAME_TO_CONTENT); | |
if (sel.contents.length) sel.remove(); | |
} | |
}; | |
var object_style_name = "AAA"; //set anchored object settings, textframe preferences, and more | |
boooxed(object_style_name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://forums.adobe.com/message/6181181