-
Notifications
You must be signed in to change notification settings - Fork 30
groups
fabiantheblind edited this page Aug 16, 2013
·
7 revisions
This was written for this stackoverflow question.
// this script needs:
// - a document with one page
// - some groups with textframes in it on the first page
var pg = app.activeDocument.pages[0]; // get the first page of the current doc
var groups = pg.groups; // get all groups
var tf_ingroup_counter = 0; // init a counter for all textframes in groups
for(var g = 0; g < groups.length;g++){
var grp = groups[g];
for(var t = 0; t < grp.textFrames.length;t++){
var tf = grp.textFrames[t]; // get the
if(tf instanceof TextFrame){
tf_ingroup_counter++; // increment counter
} // end loop textfraems in group
}
} // end loop groups
// alert all you have found
alert(
"I found on page " + pg.name +"\n" + pg.textFrames.length +
" textframes\nOh and there are also " +
tf_ingroup_counter+ " hidden in groups"
);
This wiki is maintained by:
fabiantheblind
Thanks to:
- JohnDarnell for fixing lots of typos.
- jsp for fixing lots of typos.
- ltfschoen for fixing typos.
- wridgers for adding more links.
Thanks to the students from the seminar for asking all those questions and making me start this wiki.
- adinaradke
- AnitaMei
- ce0311
- coerv
- felixharle
- FerdinandP
- Flave
- marche
- monkian
- natael
- OliverMatelowski
- PDXIII
- praktischend
- schlompf
- skaim
You are awesome.
- Arrays
- Classes
- Comments
- Conditionals
- Functions
- Inspect Properties
- Loops
- Objects
- Output And Interaction
- Recursive Functions
- Inspect Properties
- Variables And Operations
- Extended JavaScript Guide
- Bridge Talk
- Create And Read Files
- ExtendScript Toolkit
- File
- Folder
- Includes JSX
- Object Watch
- Read In JSON From File And DONT Eval
- Storing Data In A Target Engine
- Target an application
- XML
- app
- Colorbrewer
- Colors And Swatches
- Delay And View
- Dialogs
- Documents
- Duplicate And Transform
- Event AfterSave
- Export IDML
- ExtendScript in InDesign Scripting DOM
- Fonts
- GeometricBounds and Coordinates
- Get named pageItems
- Graphic Lines
- Groups
- HSL Color Wheel
- Images
- Includes
- InsertionPoints
- Layers
- Line Feeds And Carrige Returns
- Masterspreads
- Matrix
- Objectstyles
- Outlines Groups Alignment
- Pages And Margins
- Pathfinder
- Placeholder Text
- Rectangles Ovals Polygons
- RulerOrigin
- Select words at insertionPoint
- Simple Find And Change Grep with FC Query
- Simple Find And Change Grep
- Simple Find And Change Text
- Spiro
- Styles
- Text Analysis ID FC
- Text Analysis
- Text Find Locations
- Text
- Transformation Matricies
- TransparencySettings
- XML creation and import