Copy link to clipboard
Copied
Hi all,
how to use Constants.FF_FIND_USE_REGEX with find() method..
i want to find regular expressions in framemaker document using script
please help
Copy link to clipboard
Copied
I use something like this. I am not sure why I used a literal number on line 22, but I think it was because the constant didn't work.
var doc, findParams, textRange, textLoc;
// Define a text location from where to start the search (not shown);
textLoc = .....;
findParams = getRegexFindParams ("Regular expression string here");
textRange = doc.Find (textLoc, findParams);
function getRegexFindParams (regex) {
findParams = new PropVals ();
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_FindText;
propVal.propVal.valType = Constants.FT_String;
propVal.propVal.sval = regex;
findParams[0] = propVal;
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_FindCustomizationFlags;
propVal.propVal.valType = Constants.FT_Integer;
propVal.propVal.ival = 16; // Regular expressions
findParams[1] = propVal;
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_FindWrap;
propVal.propVal.valType = Constants.FT_Integer;
propVal.propVal.ival=0;
findParams[2] = propVal;
propVal = new PropVal ();
propVal.propIdent.num = Constants.FS_RegexFlavour;
propVal.propVal.valType = Constants.FT_Integer;
propVal.propVal.ival = 1;
findParams[3] = propVal;
return findParams;
}
Copy link to clipboard
Copied
Hi,
how to find and change the font size of the text in framemaker..it was successfully done using font/replace dialog..
but how to do it through script?
pls help
Copy link to clipboard
Copied
This question has nothing to do with the original one about regular expressions.
Please repost this as a new topic with another title. It helps getting more people to notice it and it serves future users of the forum to find answers to similar questions.
Copy link to clipboard
Copied
ok