Created
November 21, 2013 12:19
-
-
Save milligramme/7580668 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #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