Reply To: Jump to page.paragraph

#61089
kidpub
Member

One small tweak. I modified the paragraph code so that if no paragraph was input in the dialog (ie 42 rather than 42.6) it jumps to the page, just like Command-J. That way the script can just replace the built-in jump-to-page and I don't have to think about which to use.

//Get the paragraph in the frame

//
if (selectedParagraph != null) {
if (theFrame.paragraphs.length > selectedParagraph){
var theParagraph = theFrame.paragraphs[selectedParagraph – 1];
//Set the condition
theParagraph.applyConditions([], true);
theParagraph.applyConditions(highlightCondition);
}
else {
alert(“The page does not have that many paragraphs”);
return;
}
}

This article was last modified on November 17, 2011

Comments (0)

Loading comments...