Skip to content

Instantly share code, notes, and snippets.

@milligramme
Created November 21, 2013 12:19
Show Gist options
  • Select an option

  • Save milligramme/7580668 to your computer and use it in GitHub Desktop.

Select an option

Save milligramme/7580668 to your computer and use it in GitHub Desktop.
#include "/Users/gdansk/Forks/underscore/underscore.js"
//
var doc = app.documents[0]
var tf = doc.textFrames[0];
var pic = _.pick(doc.pageItems[0], 'geometricBounds', 'visibleBounds', 'contents');
$.writeln(pic.toSource());
var plc = _.pluck(doc.pageItems, 'geometricBounds');
$.writeln(plc.toSource());
var props = ['geometricBounds', 'visibleBounds', 'label', 'contents'];
var plcs = _.map(props, function(prp){ try {
return _.pluck(doc.pageItems, prp);
}
catch(e){} });
$.writeln(plcs);
var sel = app.selection[0];
var cells = sel.cells;
_.map(cells, function(c) {c.contents = c.name});
var pcel = _.pluck(cells, 'autoGrow')
$.writeln(pcel.toSource());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment