find regular expressions in framemaker

Participant ,
Jan 04, 2019

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

TOPICS
Scripting

Views

766

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Adobe Community Professional ,
Jan 05, 2019

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;

}

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Participant ,
Feb 25, 2019

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

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Advocate ,
Feb 25, 2019

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.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
nandhinin87775610 AUTHOR LATEST
Participant ,
Feb 25, 2019

Copy link to clipboard

Copied

ok

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more