//DESCRIPTION: Text Styles Reporter for Adobe InDesign CS2 /* ©Copyright 2005 PDS Associates This script must not be distributed without first obtaining written permission of: Dave Saunders, proprietor PDS Associates P.O. Box 127 Allenhurst, NJ 07711-0127 e-mail: davesaunders@pdsassoc.com If you find this script beneficial, please consider a donation to encourage me to write more scripts. You can do this at http://order.kagi.com/?6CYQW&lang=en or by donating to my PayPal account (e-mail above) Thank you! Last revised: August 26, 2006 */ Object.prototype.isInArray = function(myArray){ for (var i=0; myArray.length > i; i++) { if(myArray[i] == this){ return true; } } return false; } if (app.version == 3) { alert("This script does not work with InDesign CS"); exit(); } try { app.activeScript; } catch (e) { alert("This script must be run from the InDesign Scripts palette"); exit(); } if (app.documents.length != 0){ var myDoc = app.activeDocument; } else { var myDoc = app; // Looks weird, but enables reports of default fonts } // global variables report = ""; hU = decypherUnits(myDoc.viewPreferences.horizontalMeasurementUnits); vU = decypherUnits(myDoc.viewPreferences.verticalMeasurementUnits); var theDirectives = getDirectives().split("\r"); var myPanelNames = getPanelNames(theDirectives); var myChoices = getUserChoices(myPanelNames); var theSections = myChoices[0]; var userPreset = myChoices[1]; var sortOrder = myChoices[2]; var theStyleTypes = [["paragraphStyles","Paragraph Style: "],["characterStyles","Character Style: "]]; while (theStyleTypes.length > 0) { report = report + docTitle(myDoc); theStyleType = theStyleTypes.shift(); //Note: global var myStyles = myDoc[theStyleType[0]]; var myLim = myStyles.length; myDirectives = new Array(); reportSections = new Array(); var myDoneList = new Array(); if (sortOrder == "Based On") { myStyles = shuffleStyles(myStyles); } for (var i = 0;myLim > i; i++) { myDirectives = myDirectives.concat(theDirectives); reportSections = reportSections.concat(theSections); myStyle = myStyles[i]; myStyleProps = myStyle.properties; report = report + "\r

" + theStyleType[1] + myStyleProps.name + "\r"; while (true) { var nextDirective = myDirectives.shift(); if (nextDirective == null) {break}; if (validateDirective(nextDirective)){ // Logic: we hit the sections in the order they occur in reportSections, so, the following should work if (nextDirective.indexOf("*") == 0) { if ((reportSections[0] == false) || ((nextDirective.indexOf("**") == -1) && (theStyleType[0] == "characterStyles"))) { reportSections.shift(); myDirectives.shift(); while (myDirectives.length != 0) { if (myDirectives[0].indexOf("*") == 0) {break} myDirectives.shift(); } continue } else { reportSections.shift(); } } // Need to split this because tabs and nested styles mess with report theProcessed = processDirective(nextDirective, theStyleType[0]); report = report + theProcessed; } } } } // What a way to do this, but let's reduce all integer pts measures to integers report = report.split(".0 pts").join(" pts"); // Let's also get rid of spurious spaces at the ends of lines report = report.split("\u2003 \r").join("\r"); // Dump report into a new document // Make new document using user preset, if it exists. try { var doc = app.documents.add(true,userPreset); } catch (e) { var doc = app.documents.add(true); } // Set default character style to No Character Style doc.textDefaults.appliedCharacterStyle = doc.characterStyles[0]; // Delete existing default styles myStyles = doc.paragraphStyles; try { for (i = (myStyles.length -1); i > 0; i--) { myStyles[i].remove(); } } catch (e) {} myStyles = doc.characterStyles; for (i = (myStyles.length -1); i > 0; i--) { myStyles[i].remove(); } // Make a library in script folder: var myFile = File(File((app.activeScript).path) + "/" + File(app.activeScript).name.split(".jsx").join(".inds")); try { doc.pages[0].place(myFile); } catch (e) { alert("Can't locate snippet file. Report can't be generated"); } doc.pageItems[0].remove(); // OK, styles are in place; let's make the report. tf = doc.textFrames.add() fitFrameToMargins(tf); tf.contents = report; //Now we need to interpret our own styletags myStory = tf.parentStory; removeEmptyParas(myStory); myStyles=doc.paragraphStyles; for (i = 1; myStyles.length > i; i++) { app.findPreferences = null; app.changePreferences = null; myFindString = "<" + myStyles[i].name + ">"; myStory.search(myFindString,false,false,undefined, undefined,{appliedParagraphStyle:myStyles[i]}) app.changePreferences = null; myStory.search(myFindString,false,false,"",) } // One more thing: if Character styles title is last paragraph, delete it: if (myStory.paragraphs[-1].appliedParagraphStyle.name == "Title") { myStory.paragraphs[-1].remove(); } // Finally, we flow pages, if necessary try { DumbRunPages(doc, myStory); } catch (e) { alert("Your report will not flow; the story is overset. To avoid this, use a document preset with wider columns."); } app.layoutWindows[0].activeSpread = doc.spreads[0]; // ============== Functions Start Here ============================ function shuffleStyles(theStyles) { var myStyleNames = new Array; var myBaseNames = new Array; for (var i=1; theStyles.length>i; i++) { myStyleNames.push(theStyles[i].name); (theStyles[i].basedOn.constructor.name == "String")?myBaseNames.push(theStyles[i].basedOn):myBaseNames.push(theStyles[i].basedOn.name); } var myList = new Array(theStyles[0]); var curBase = new Array(theStyles[0].name); while (myList.length < theStyles.length){ var foundOne = false; for (i = 0; myStyleNames.length > i; i++) { if (myBaseNames[i] == curBase[curBase.length-1]) { myList.push(theStyles[i+1]); myBaseNames[i] = ""; curBase.push(myStyleNames[i]); foundOne = true; break; } } if (!foundOne){ // Went through list without finding one, so curBase.pop(); } } return myList } function removeEmptyParas(theStory) { var myParaLengths = theStory.paragraphs.everyItem().length; for (var i = myParaLengths.length - 1; i >= 0; i--) { if (myParaLengths[i] == 1) theStory.paragraphs[i].remove(); } } function processDirective(theText,theStyle) { var theResult var theParts = theText.split("\t"); if (theParts.length == 1){ return "\r

"+ theText.replace(/\*+/,"") + "\r"; } if (theParts[0].indexOf("~") == 0) theParts[0] = theParts[0].substr(1); // This is where we check for a conditional command if (theParts[0].indexOf(")") != -1) { if (!evalConditional(theParts[0])) { return ""; } theParts[0] = theParts[0].substr(theParts[0].lastIndexOf(")") + 1); } if (theParts[0] == "ruleBelow") report = report + "\r"; //Force new line for rule below start if (report.lastIndexOf("\r") == report.length - 1) { // We're starting a new paragraph if (theParts[0] == "ruleBelow") { theResult = ""; } else { theResult = ""; } } else { theResult = ""; } try { theResolution = myResolve(theParts[0],theParts[1],theStyle); if (theResolution != "") { return theResult + theResolution; } else { return "" } } catch (e) { // Comes into play in relative reports where style is same as based on return "" } } function evalConditional(theString) { theExp = theString.substring(0,theString.lastIndexOf(")") + 1); return eval(theExp.replace(/(\(+)/g,"$1myStyleProps.")); } function myResolve(theProp,theString,Style) { var myParts = theString.split(": "); var myResult = myParts[0] + ": " myWords = myParts[1].split(" "); myType = myWords.shift(); myRemerged = myWords.join(" "); if (myStyleProps[theProp] == 1851876449) { throw(""); // return myResult + " \u2003 " //Only happens in character styles } switch (myType) { case "points" : var myVal = myStyleProps[theProp]; if ((myVal == -1) || (myVal > 1000000)) { // Only happens for leading myVal = myStyleProps.pointSize * myStyleProps.autoLeading/100; return myResult + "auto (" + formattedNumber(myVal,2,"pts") + ")\u2003 " } else { return myResult + formattedNumber(myVal,2,"pts") + "\u2003 " } case "checkedcolor" : if (myStyleProps[theProp] == 1651856451) { throw ("")}; case "color" : return myResult + getColorName(theProp) + "\u2003 " case "baseline" : var theSetting if (!myStyleProps[theProp]) { theSetting = "None" } else if (myStyleProps.gridAlignFirstLineOnly) { theSetting = "First Line Only"; } else { theSetting = "All Lines"; } return myResult + theSetting + "\u2003 " case "bulletchar" : return myResult + String.fromCharCode(myStyleProps[theProp]["characterValue"]) + "\u2003 "; case "integertochar" : return myResult + String.fromCharCode(myStyleProps[theProp]) + "\u2003 " case "number" : return myResult + formatNumber(Number(myStyleProps[theProp]),2) + "\u2003 " case "characters" : case "weight" : case "hyphens" : case "letters" : case "lines" : return myResult + myStyleProps[theProp] + " " + myType + "\u2003 " case "hmeasure" : return myResult + formattedNumber(Number(myStyleProps[theProp]),2,hU) + "\u2003 " case "vmeasure" : return myResult + formattedNumber(Number(myStyleProps[theProp]),2,vU) + "\u2003 " case "percentage" : var myNum = myStyleProps[theProp]; if (myNum == -1) { myNum = 100 } return myResult + formatNumber(myNum,2) + "%\u2003 " case "checkedstyle" : if (myStyleProps[theProp].split("(").length > 1) { throw ("")}; case "checkedstring" : if (myStyleProps[theProp] == "text font family") { throw ("")}; case "checkedinteger" : if (myStyleProps[theProp] == 1651856467) { throw ("")}; case "integer" : case "string" : return myResult + myStyleProps[theProp] + "\u2003 " case "enum" : return myResult + evalEnum(myStyleProps[theProp],myRemerged) + "\u2003 " case "stringobject" : try{ if (myStyleProps[theProp].constructor.name == "String") { return myResult + myStyleProps[theProp] + "\u2003 " } } catch(e) {} // Don't put anything here; this needs to drop through case "object" : try { return myResult + myStyleProps[theProp][myRemerged] + "\u2003 " } catch (e) { throw (""); // Should only happen when trying for the Based On of No Paragraph Style } case "checkedfont" : if (myStyleProps[theProp] == 1651856469) { throw ("")}; return myResult + myStyleProps[theProp].fontFamily + "\u2003 " case "fontname" : if (theStyleType[0] == "characterStyles") { if (myStyleProps.appliedFont == "") { throw ("")}; return myResult + myStyleProps.appliedFont + "\u2003 "; } try { return myResult + myStyleProps.appliedFont.fontFamily + "\u2003 "; } catch(e) { return myResult + "[unmounted]\u2003 "; } case "boolean" : (myStyleProps[theProp]) ? myResult = myResult + myWords[0] + "\u2003 " : myResult = myResult + myWords[1] + "\u2003 " return myResult case "tablist" : return processTabs(myStyleProps[theProp]); case "nestedstyles" : return "\r" + myResult + processNests(myStyleProps.parent.paragraphStyles.item(myStyleProps.name)[theProp]); default : return theString + "\u2003 " } } function getColorName(myProp) { try { var firstTry = myStyleProps[myProp]["name"]; if (firstTry != undefined) return firstTry } catch (e) {} var secondTry = myStyleProps[myProp]; if (secondTry != null) return secondTry throw("") } function processNests(nestList){ var theCount = nestList.length; if (theCount == 0) return String(theCount); var myNests = String(theCount) + "\r"; for (var i = 0; theCount > i; i++) { myNests = myNests + "" + processNest(nestList[i]) + "\r"; } return myNests } function processNest(theNest){ var theText = ""; var theProps = ["appliedCharacterStyle", "delimiter"]; for (var i = 0; theProps.length > i; i++) { theNestInfo = nestProp(theNest,theProps[i]); theText = theText + theNestInfo + "\u2003 "; } return theText } function processTabs(tabList) { // This is the kind of dirty trick that global variables make possible: report = report.substring(0,report.length - 1) + ": " + String(tabList.length) + "\r"; var myTabs = ""; for (var i = 0; tabList.length > i; i++) { myTabs = myTabs + "Tab " + (i + 1) + ":" + processTab(tabList[i]) + " \r"; if (tabList.length - 1 > i) { myTabs = myTabs + ""; } } return myTabs } function processTab(theTab) { var theText = "\u2003 " for (theProp in theTab){ try { theTabInfo = tabProp(theTab,theProp); theText = theText + theTabInfo + "\u2003 "; } catch (e) { // unsupported properties are thrown out } } return theText } function nestProp(myNest,theLabel) { var myText, plural; switch (theLabel) { case "appliedCharacterStyle" : return "Character Style: " + myNest[theLabel]["name"]; case "delimiter" : if (myNest.inclusive) { myText = "through " + myNest.repetition + " " } else { myText = "up to " + myNest.repetition + " " } if (myNest[theLabel].constructor.name == "String") { return myText + myNest[theLabel] } (myNest.repetition > 1) ? plural = "s" : plural = ""; switch (myNest.delimiter) { case 1380541539 : return myText + "Character" + plural case 1380541559 : return myText + "Word" + plural case 1396797550 : return myText + "Auto Page Number" + plural case 1380541540 : return myText + "Digit" + plural case 1380541507 : return myText + "Dropcap" + plural // Can this really happen? case 1397058899 : return myText + "em Space" + plural case 1396855379 : return myText + "End Nested Style Character" + plural case 1397059155 : return myText + "en Space" + plural case 1397124194 : return myText + "Forced Line Break" + plural case 1397319796 : return myText + "Indent to Here Tab" + plural case 1380541545 : return myText + "Inline Graphic" + plural case 1380541548 : return myText + "Letter" + plural case 1397645907 : return myText + "Nonbreaking Space" + plural case 1400073805 : return myText + "Section Marker" + plural case 1380541555 : return myText + "Sentence" + plural case 1380541556 : return myText + "Tab" + plural default : return myText + "Unrecognized" } default : } } function tabProp(myTab,theLabel) { var myText; switch (theLabel) { case "alignment" : myText = "Alignment: " switch (myTab.alignment) { case 1818584692 : return myText + "Left" case 1667591796 : return myText + "Center" case 1919379572 : return myText + "Right" case 1952604515 : return myText + "Character" default : return myText + "Unrecognized" } case "alignmentCharacter" : if (myTab.alignment == 1952604515) { return "Align On: " + myTab.alignmentCharacter } throw ""; case "leader" : myText = "Leader: " + myTab.leader; if (myText == "Leader: ") { return "Leader: none" } return myText case "position" : return "Position: " + formattedNumber(Number(myTab.position),3,hU) default : throw "" } } function evalEnum(theNum,theString){ var myParts = theString.split(";"); for (var i = 0; myParts.length > i; i++) { var mySubParts = myParts[i].split(","); if (theNum == mySubParts[1]) return mySubParts[0]; } return theNum; } function docTitle(doc) { if (theStyleTypes[0][0] == "paragraphStyles") { var theText = "" + doc.constructor.name + "\u2002" + doc.name; theText = theText + "\u2002Paragraph Styles\r"; } else { var theText = "\r<Title>" + doc.constructor.name + "\u2002" + doc.name; theText = theText + "\u2002Character Styles\r"; } return theText } function validateDirective(directive){ if (directive.indexOf("//") == 0) { return false; } if (directive.indexOf("*") == 0) {return true} // If a non-panel directive doesn't contain a tab, it's not ready for primetime if (directive.split("\t").length == 1) {return false} return true } function getPanelNames(theList) { var theLim = theList.length; var theResult = new Array; for (var i = 0; theLim > i; i++) { if (theList[i].indexOf("*") == 0) { theResult.push(theList[i].replace(/\*+/,"")); } } return theResult } function getUserChoices(PanelNames) { var myLim = PanelNames.length; var myPresetsLim = app.documentPresets.length; var myPresetsList = app.documentPresets.everyItem().name; if (myPresetsList.constructor.name != "Array") { myPresetsList = [ myPresetsList ]; } var mySortsList = ["Alphabetic","Based On"] interactWithAll(); // Make sure interaction is switched on. app.scriptPreferences.version = 3; // To get around a bug in 4's borderPanels var myDialog = (app.dialogs.add({name:"Paragraph Style Report"})) with (myDialog) { with (dialogColumns.add()) { with (borderPanels.add()) { with (dialogRows.add()) { var myChecks = new Array; with (dialogColumns.add()) { for (var i = 0; Math.floor((myLim + 1)/2)>i; i++) { myChecks[i] = checkboxControls.add({staticLabel:PanelNames[i],checkedState:true}); } } with (dialogColumns.add()) { staticTexts.add({staticLabel:" "}); } with (dialogColumns.add()) { for (var i = Math.floor((myLim + 1)/2); myLim>i; i++) { myChecks[i] = checkboxControls.add({staticLabel:PanelNames[i],checkedState:true}); } } } } // with (borderPanels.add({minWidth:500})) { // with (dialogColumns.add()) { with (dialogRows.add()) { with (dialogColumns.add()) {staticTexts.add({staticLabel:"Sort Order of Report:",minWidth:160})} with (dialogColumns.add()) {mySort = dropdowns.add({stringList:mySortsList,selectedIndex:0,minWidth:160})} } with (dialogRows.add()) { with (dialogColumns.add()) {staticTexts.add({staticLabel:"Use Document Preset:",minWidth:160})} with (dialogColumns.add()) {myPreset = dropdowns.add({stringList:myPresetsList,selectedIndex:0,minWidth:160})} } } // } // } if(show() != true){ // User cancelled myDialog.destroy(); app.scriptPreferences.version = 4; // To get around a bug in 4's borderPanels exit(); } else { var userPanels = new Array; for (var i = 0; myLim > i; i++) { userPanels.push(myChecks[i].checkedState); } var thePreset = myPresetsList[myPreset.selectedIndex]; var theSort = mySortsList[mySort.selectedIndex]; myDialog.destroy(); app.scriptPreferences.version = 4; // To get around a bug in 4's borderPanels } } return [userPanels, thePreset, theSort] } function fitFrameToMargins(theFrame) { var thePage = theFrame.parent; if (thePage.constructor.name != "Page") throw ("Frame is not free-standing; it cannot be fit.") var myPbounds = thePage.bounds; if ((thePage.name % 2 == 1) || (!thePage.parent.parent.documentPreferences.facingPages)) { theFrame.geometricBounds = [myPbounds[0] + thePage.marginPreferences.top, myPbounds[1] + thePage.marginPreferences.left, myPbounds[2] - thePage.marginPreferences.bottom, myPbounds[3] - thePage.marginPreferences.right]; } else { theFrame.geometricBounds = [myPbounds[0] + thePage.marginPreferences.top, myPbounds[1] + thePage.marginPreferences.right, myPbounds[2] - thePage.marginPreferences.bottom, myPbounds[3] - thePage.marginPreferences.left]; } theFrame.textFramePreferences.textColumnCount = thePage.marginPreferences.columnCount; theFrame.textFramePreferences.textColumnGutter = thePage.marginPreferences.columnGutter; } function DumbRunPages(theDoc, theStory) { // What makes this "dumb" is that default master pages are used. var uRuler = theDoc.viewPreferences.rulerOrigin; theDoc.viewPreferences.rulerOrigin = RulerOrigin.spreadOrigin; while (theStory.textFrames[-1].overflows) { theDoc.documentPreferences.pagesPerDocument = theDoc.documentPreferences.pagesPerDocument + 1; var backPage = theDoc.pages[-1]; app.activeWindow.activePage = backPage; backPage.appliedMaster = theDoc.pages[-2].appliedMaster; var myPbounds = backPage.bounds; var myNewTF = backPage.textFrames.add(); if ((backPage.name % 2 == 1) || (!theDoc.documentPreferences.facingPages)) { myNewTF.geometricBounds = [myPbounds[0] + backPage.marginPreferences.top, myPbounds[1] + backPage.marginPreferences.left, myPbounds[2] - backPage.marginPreferences.bottom, myPbounds[3] - backPage.marginPreferences.right]; } else { myNewTF.geometricBounds = [myPbounds[0] + backPage.marginPreferences.top, myPbounds[1] + backPage.marginPreferences.right, myPbounds[2] - backPage.marginPreferences.bottom, myPbounds[3] - backPage.marginPreferences.left]; } myNewTF.itemLayer = theStory.textFrames[-1].itemLayer; myNewTF.previousTextFrame = theStory.textFrames[-1]; myNewTF.textFramePreferences.textColumnCount = backPage.marginPreferences.columnCount; myNewTF.textFramePreferences.textColumnGutter = backPage.marginPreferences.columnGutter; if (myNewTF.characters.length == 0){ theDoc.viewPreferences.rulerOrigin = uRuler; throw ("Permanently overset"); // This indicates a permanent overset condition so break out of loop } } theDoc.viewPreferences.rulerOrigin = uRuler; } function decypherUnits (theNum) { if (theNum<257) { // Custom settings are in points. return "pts"; } // Decyphers for print purposes, so inches and inches decimal are both returned as 'ins' theNums = [2054187363,2054188905,2053729891,2053729892,2053991795,2053336435,2053335395] theMeanings = ["picas","pts","ins","ins","mms","cms","ciceros"] for (var i = 0; i<theNums.length; i++) { if (theNum == theNums[i]) return theMeanings[i]; } return theNum } function formatNumber(num, decplaces) { b = (num == Math.round(num)) ? num : Number(num).toFixed(decplaces); return b; } function formattedNumber (num, decplaces, units) { var yeSign = ""; if (num < 0) { yeSign = "-"; num = Math.abs(num) } if (num == Math.round(num)) { b = Number(num).toFixed(1) } else { b = Number(num).toFixed(decplaces); } switch (units) { case "picas" : var sep = "p"; break; case "ciceros" : var sep = "c"; break; default : var yeResult = (units == "") ? yeSign + stripTrailingZeroes(b) : yeSign + stripTrailingZeroes(b) + " " + units; return yeResult; } whole = Math.floor(num) fract = (((num - whole)*12).toFixed(3)); if (fract == (Math.round(fract).toFixed(3))) { fract = Math.round(fract); } else { fract = stripTrailingZeroes(fract); } return yeSign + whole.toString() + sep + fract; } function stripTrailingZeroes (numString) { var myParts = numString.split("."); if (myParts.length != 2) { return numString; } var myDigits = myParts[1].split("0"); if (myParts[1] === myDigits){ // fractional part has no zeroes return numString; } var fract = "" for (var j=myDigits.length; j>0; j--) { if ((fract == "") && (myDigits[j-1] == "")){ continue; } else { fract = (myDigits[j-1] == "") ? "0" + fract : myDigits[j-1] + fract; } } fract = (fract == "") ? "0" : fract; return myParts[0] + "." + fract; } function interactWithAll() { if (app.version == 3) { app.userInteractionLevel = UserInteractionLevels.interactWithAll; } else { app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; } } function getDirectives() { return '//This is for CS2\r' + '// Directives: lines that start with "//" are comments and ignored completely\r' + '// Lines that start with "*" are panel names\r' + '**General\r' + '//name\tName: string -- commented out because script gives name special treatment\r' + 'basedOn\tBased On: stringobject name\r' + 'nextStyle\tNext Style: stringobject name\r' + 'imported\tImported: boolean yes no\r' + '**Basic Character Formats\r' + 'appliedFont\tFont: fontname\r' + 'fontStyle\tStyle: string\r' + 'pointSize\tSize: points\r' + 'leading\tLeading: points\r' + 'kerningMethod\tKerning Method: string\r' + 'tracking\tTracking: number\r' + 'capitalization\tCase: enum Normal, 1852797549; Small Caps, 1936548720; All Caps, 1634493296; OpenType All Small Caps, 1664250723\r' + 'position\tPosition: enum Normal, 1852797549; Superscript, 1936749411; Subscript, 1935831907; OpenType Superscript, 1884247155; OpenType Subscript, 1884247138; OpenType Numerator, 1884247150; OpenType Denominator, 1884247140\r' + 'underline\tUnderline: boolean on off\r' + 'strikeThru\tStrikethrough: boolean on off\r' + 'ligatures\tLigatures: boolean on off\r' + 'noBreak\tNo Break: boolean on off\r' + '**Advanced Character Formats\r' + 'horizontalScale\tHorizontal Scale: percentage\r' + 'verticalScale\tVertical Scale: percentage\r' + 'baselineShift\tBaseline Shift: points\r' + 'skew\tSkew: number\r' + 'appliedLanguage\tLanguage: object name\r' + '*Indents and Spacing\r' + 'justification\tAlignment: enum Left Align, 1818584692; Center Align, 1667591796; Right Align, 1919379572; Left Justified, 1818915700; Right Justified, 1919578996; Center Justified, 1667920756; Fully Justified, 1718971500; Towards Spine, 1630691955; Away from Spine, 1633772147\r' + 'balanceRaggedLines Balance Ragged Lines: enum Fully Balanced, 1114391921; No Balancing, 1114394470; Pyramid Shape, 1114394745; Vee Shape, 1114396261\r' + 'leftIndent\tLeft Indent: hmeasure\r' + 'firstLineIndent\tFirst Line Indent: hmeasure\r' + 'rightIndent\tRight Indent: hmeasure\r' + 'lastLineIndent\tLast Line Indent: hmeasure\r' + 'spaceBefore\tSpace Before: vmeasure\r' + 'spaceAfter\tSpace After: vmeasure\r' + 'alignToBaseline\tAlign to Baseline: baseline\r' + '//gridAlignFirstLineOnly -- commented out: handled by the previous entry\r' + '*Tabs\r' + 'tabList\tTabs: tablist\r' + '*Paragraph Rules\r' + 'ruleAbove\tRule Above: boolean on off\r' + '(ruleAbove)ruleAboveLineWeight\tLine Weight: points\r' + '(ruleAbove)ruleAboveType\tType: object name\r' + '(ruleAbove)ruleAboveColor\tColor: color\r' + '(ruleAbove)ruleAboveTint\tTint: percentage\r' + '(ruleAbove)ruleAboveOverprint\tOverprint: boolean on off\r' + '(ruleAbove)ruleAboveGapColor\tGap Color: color\r' + '((ruleAbove) && (ruleAboveGapColor.name != "None"))ruleAboveGapTint\tGap Tint: percentage\r' + '((ruleAbove) && (ruleAboveGapColor.name != "None"))ruleAboveGapOverprint\tGap Overprint: boolean on off\r' + '// ruleAboveWidth the CS value for Column Width is 1802270564\r' + '(ruleAbove)ruleAboveWidth\tWidth: enum Column, 1265399652; Text, 1886681207; Column, 1802270564\r' + '(ruleAbove)ruleAboveOffset\tOffset: vmeasure\r' + '(ruleAbove)ruleAboveLeftIndent\tLeft Indent: hmeasure\r' + '(ruleAbove)ruleAboveRightIndent\tRight Indent: hmeasure\r' + 'ruleBelow\tRule Below: boolean on off\r' + '(ruleBelow)ruleBelowLineWeight\tLine Weight: points\r' + '(ruleBelow)ruleBelowType\tType: object name\r' + '(ruleBelow)ruleBelowColor\tColor: color\r' + '(ruleBelow)ruleBelowTint\tTint: percentage\r' + '(ruleBelow)ruleBelowOverprint\tOverprint: boolean on off\r' + '(ruleBelow)ruleBelowGapColor\tGap Color: color\r' + '((ruleBelow) && (ruleBelowGapColor.name != "None"))ruleBelowGapTint\tGap Tint: percentage\r' + '((ruleBelow) && (ruleBelowGapColor.name != "None"))ruleBelowGapOverprint\tGap Overprint: boolean on off\r' + '// ruleBelowWidth the CS value for Column Width is 1802270564\r' + '(ruleBelow)ruleBelowWidth\tWidth: enum Column, 1265399652; Text, 1886681207; Column, 1802270564\r' + '(ruleBelow)ruleBelowOffset\tOffset: vmeasure\r' + '(ruleBelow)ruleBelowLeftIndent\tLeft Indent: hmeasure\r' + '(ruleBelow)ruleBelowRightIndent\tRight Indent: hmeasure\r' + '*Keep Options\r' + 'keepWithNext\tKeep with next: lines\r' + 'keepAllLinesTogether\tKeep all lines together: boolean yes no\r' + 'keepLinesTogether\tKeep lines together: boolean yes no\r' + '(keepLinesTogether)keepFirstLines\tKeep together at start: lines\r' + '(keepLinesTogether)keepLastLines\tKeep together at end: lines\r' + 'startParagraph\tStart Paragraph: enum Anywhere, 1851945579; Next Column, 1667396203; Next Frame, 1313235563; Next Page, 1885500011; Next Odd Page, 1332765291; Next Even Page, 1164993131\r' + '*Hyphenation\r' + 'hyphenation\tHyphenation: boolean on off\r' + '(hyphenation)hyphenateWordsLongerThan\tWords with at least: letters\r' + '(hyphenation)hyphenateAfterFirst\tAfter First: letters\r' + '(hyphenation)hyphenateBeforeLast\tBefore Last: letters\r' + '(hyphenation)hyphenateLadderLimit\tHyphen Limit: hyphens\r' + '(hyphenation)hyphenationZone\tHyphenation Zone: hmeasure\r' + '(hyphenation)hyphenWeight\tBetter Spacing/Fewer Hyphens: weight\r' + '(hyphenation)hyphenateCapitalizedWords\tCapitalized Words: boolean on off\r' + '(hyphenation)hyphenateLastWord\tLast Word of Paragraph: boolean on off\r' + '*Justification\r' + 'minimumWordSpacing\tWord Spacing Minimum: percentage\r' + 'desiredWordSpacing\tDesired: percentage\r' + 'maximumWordSpacing\tMaximum: percentage\r' + 'minimumLetterSpacing\tLetter Spacing Minimum: percentage\r' + 'desiredLetterSpacing\tDesired: percentage\r' + 'maximumLetterSpacing\tMaximum: percentage\r' + 'minimumGlyphScaling\tGlyph Scaling Minimum: percentage\r' + 'desiredGlyphScaling\tDesired: percentage\r' + 'maximumGlyphScaling\tMaximum: percentage\r' + 'autoLeading\tAuto Leading: percentage\r' + 'singleWordJustification\tSingle Word Justification: enum Left Align, 1818584692; Center Align, 1667591796; Right Align, 1919379572; Fully Justified, 1718971500\r' + 'composer\tComposer: string\r' + '*Drop Caps and Nested Styles\r' + 'dropCapLines\tDrop Cap: lines\r' + 'dropCapCharacters\tDrop Cap: characters\r' + 'dropCapStyle\tDrop Cap Character Style: object name\r' + 'nestedStyles\tNested Styles: nestedstyles\r' + '*Bullets and Numbering\r' + 'bulletsAndNumberingListType\tList Type: enum Bulleted, 1280598644; None, 1280601711; Numbered , 1280601709\r' + '(bulletsAndNumberingListType == 1280598644)bulletChar\tBullet Character: bulletchar\r' + '(bulletsAndNumberingListType == 1280601709)numberingStyle\tNumbered List Style: enum Arabic, 1298231906; Lowercase Letters, 1296855660; Lowercase Roman, 1297247596; Uppercase Letters, 1296855669; Uppercase Roman, 1297247605 \r' + '(bulletsAndNumberingListType == 1280601709)numberSeparator\tNumber Separator: integertochar \r' + '(bulletsAndNumberingListType == 1280601709)numberStartAt\tStart At: integer\r' + '(bulletsAndNumberingListType != 1280601711)numberingFont\tFont: checkedstring\r' + '(bulletsAndNumberingListType != 1280601711)numberingFontStyle\tStyle: checkedstyle\r' + '(bulletsAndNumberingListType != 1280601711)bulletsAndNumberingSize\tSize: checkedinteger\r' + '(bulletsAndNumberingListType != 1280601711)bulletsAndNumberingColor\tColor: checkedcolor\r' + '**Character Color\r' + 'fillColor\tFill Color: color\r' + '(fillColor != "None")fillTint\tFill Tint: percentage\r' + '(fillColor != "None")overprintFill\tOverprint Fill: boolean on off\r' + '(strokeColor != "None")strokeWeight\tStroke Weight: points\r' + 'strokeColor\tStroke Color: color\r' + '(strokeColor != "None")strokeTint\tStroke Tint: percentage\r' + '(strokeColor != "None")overprintStroke\tOverprint Stroke: boolean on off\r' + '**OpenType Features\r' + 'otfTitling\tTitling: boolean on off\r' + 'otfContextualAlternate\tContextual Alternates: boolean on off\r' + 'otfSwash\tSwash: boolean on off\r' + 'otfOrdinal\tOrdinals: boolean on off\r' + 'otfFraction\tFractions: boolean on off\r' + 'otfDiscretionaryLigature\tDiscretionary Ligatures: boolean on off\r' + 'otfFigureStyle\tFigure Style: enum Tabular Lining, 1330931316; Proportional Oldstyle, 1330933619; Proportional Lining, 1330932848; Tabular Oldstyle, 1330933620; Default, 1147563124\r' + 'otfSlashedZero\tSlashed Zero: boolean on off\r' + 'otfStylisticSets\tStylistic Set: number\r' + 'otfHistorical\tHistorical: boolean on off\r' + '**Underline Options\r' + 'underline\tUnderline: boolean on off\r' + '(underline)underlineWeight\tWeight: points\r' + '(underline)underlineType\tType: object name\r' + '(underline)underlineOffset\tOffset: points\r' + '(underline)underlineColor\tColor: color\r' + '(underline)underlineTint\tTint: percentage\r' + '(underline)underlineOverprint\tOverprint: boolean on off\r' + '(underline)underlineGapColor\tGap Color: color\r' + '(underline)underlineGapTint\tGap Tint: percentage\r' + '(underline)underlineGapOverprint\tGap Overprint: boolean on off\r' + '**Strikethrough Options\r' + 'strikeThru\tStrikethrough: boolean on off\r' + '(strikeThru)strikeThroughWeight\tWeight: points\r' + '(strikeThru)strikeThroughType\tType: object name\r' + '(strikeThru)strikeThroughOffset\tOffset: points\r' + '(strikeThru)strikeThroughColor\tColor: color\r' + '(strikeThru)strikeThroughTint\tTint: percentage\r' + '(strikeThru)strikeThroughOverprint\tOverprint: boolean on off\r' + '(strikeThru)strikeThroughGapColor\tGap Color: color\r' + '(strikeThru)strikeThroughGapTint\tGap Tint: percentage\r' + '(strikeThru)strikeThroughGapOverprint\tGap Overprint: boolean on off\r' + '//**Scripting and Object Model\r' + '//id\r' + '//label\r' + '//parent\r' + '//index\r' + '//properties'; } /* Recent Changes May 15, 2006 Inserted InteractWithAll call to make sure that dialog shows up August 12, 2006 Changed name of 'resolve' function to 'myResolve' to eliminate clash with ExtendScript built-in function. Thanks to Kris Coppieters for tracking this down. */