I think it might be useful to include this script. I preduces a "manual" of how to set the properties of a selected object (between 40 to 100 pages of properties). The script is not finished but works quite nicely. Select an object / text / something and then run the script. Takes about 30 seconds to run. If I say so myself it's quite a nice not script Let me know if all clear. #target "indesign" #targetengine "main" myDoc = app.activeDocument; mySelection=app.selection[0] pl="" myProperties=mySelection; myPropertiesString="app.selection[0]"; //mo = new Object //mo = {a:4, b:5, c:{q:5, w:8, ss:"foo", fred:{we:5,fh:65}}, d:10}; s="" ss=0; myObjConstructor=myProperties.constructor.name.toString(); n = (myObjConstructor[0]=="A" ||myObjConstructor[0]=="E" ||myObjConstructor[0]=="I" ||myObjConstructor[0]=="O" ||myObjConstructor[0]=="U") ? "n ": " "; s="* "+myPropertiesString+" is a"+n+myObjConstructor+" *\r\r"; elem(myProperties,myPropertiesString) function elem(obj, subObj) { var oldSubObj = subObj; var p=0 var y=[] var z = [] for (x in obj) { ++p y =x ss++; try { (obj !=null) ? z =obj : z ="nullnulllnull";} catch (notApplicable) {z ="null"} try {zz= z .properties} catch (np) {zz=z .constructor.name; /*alert(z )*/}; zzz=z .constructor.name; szp=(zzz=="Enumerator") ? z .toString() + " or ":""; if (z !=null) { if (zz=="[object Object]" ) { if( y !="parent"&& y !="parentStory" && y !="startTextFrame" && y !="endTextFrame" && y !="nextTextFrame" && y !="previousTextFrame" && y !="nextStyle" && y !="previousStyle" && y !="pageStart" && y !="pageEnd" && y !="index" && y !="index") { var sz=(subObj+"."+y .toString()) s+=subObj+" ."+y +" = "+z +"\t"+zz+"\t"+zzz+" *\r"; eval("elem("+sz+",'"+sz+"');"); }} else {s+=subObj+" ."+y +" = "+szp+z +"\t"+zz+"\t"+zzz+"\r";subObj = oldSubObj ;} } else {s+=subObj+" ."+y +" = "+szp+z +"\t"+zz+"\t"+zzz+"\r"; subObj = oldSubObj ;} subObj = oldSubObj ; } } myContents=s; myDoc = app.documents.add(); app.activeDocument.layoutWindows[0].screenMode = ScreenModeOptions.PRESENTATION_PREVIEW; oldUnits=app.scriptPreferences.measurementUnit; app.scriptPreferences.measurementUnit=MeasurementUnits.MILLIMETERS; myDoc.documentPreferences.properties = {facingPages:0, intent:DocumentIntentOptions.PRINT_INTENT, pageHeight:210, pageWidth:297, pageOrientation:PageOrientation.LANDSCAPE} setUpStyles(); mastertextFrames = myDoc.masterSpreads.item("A-Master").textFrames.add ({geometricBounds: [200,0,210,297], contents:SpecialCharacters.AUTO_PAGE_NUMBER}); mastertextFrames.parentStory.paragraphs[0].justification=Justification.CENTER_ALIGN mastertextFrames.duplicate([297,200]) myTextFrame = app.activeWindow.activePage.textFrames.add({geometricBounds:[12, 12, 198, 285], strokeWeight:0, strokeColor:"None"}); myTextFrame.parentStory.appliedParagraphStyle=mps myTextFrame.parentStory.contents=myContents while (myTextFrame.overflows) {addPage(myTextFrame)} function addPage(prevTextFrame) { myPage = myDoc.pages.add(); myTextFrame = myPage.textFrames.add({geometricBounds:[12, 12, 198, 285], strokeWeight:0, strokeColor:"None"}); myTextFrame.previousTextFrame = prevTextFrame; } function setUpStyles() { mcs=myDoc.characterStyles.add({name:"Value", fillColor:"Black", appliedFont:"Minion Pro", fontStyle:"Bold"}); mcs2=myDoc.characterStyles.add({name:"Properties", fillColor:"Black", appliedFont:"Minion Pro", fontStyle:"Bold Cond"}); mcs3=myDoc.characterStyles.add({name:"Property", fillColor:"Black", appliedFont:"Minion Pro", fontStyle:"Bold Italic", horizontalScale:115}); mcs4=myDoc.characterStyles.add({name:"Object", pointSize:6, underline:1}); mps=myDoc.paragraphStyles.add({name:"main", pointSize:3.5, fillColor:"C=0 M=100 Y=0 K=0", appliedFont:"Minion Pro", fontStyle:"Medium", justification:Justification.LEFT_ALIGN, paragraphDirection:ParagraphDirectionOptions.LEFT_TO_RIGHT_DIRECTION, digitsType:DigitsTypeOptions.ARABIC_DIGITS}) mps.nestedGrepStyles.add({appliedCharacterStyle:mcs4, grepExpression:".+?\\*$"}); mps.nestedGrepStyles.add({appliedCharacterStyle:mcs, grepExpression:"(?<=\=).+?\\t"}); mps.nestedGrepStyles.add({appliedCharacterStyle:mcs2, grepExpression:"^\\S+"}); mps.nestedGrepStyles.add({appliedCharacterStyle:mcs3, grepExpression:"(?<=\s).+? \="}); } app.activeWindow.activePage = app.activeDocument.pages[0];
... View more