• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

find regular expressions in framemaker

Contributor ,
Jan 04, 2019 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

1.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 05, 2019 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;

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Feb 25, 2019 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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 25, 2019 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.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

ok

Votes

Translate

Translate

Report

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