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

One difference between FM10/11 and later FM versions

Community Expert ,
Feb 03, 2018 Feb 03, 2018

Copy link to clipboard

Copied

Dear all,

I want to inform you that there is a subtle difference in the Find function between scripts for FM-10/11 and the later FM versions.

See the relevant script part (function CollectVarsInDoc, line 50):

oTR = oDoc.Find(oTR.beg, findParams);     // prepare for next find

While this is OK in the newer FM version, in FM-10/11 it creates a loop at the first found variable.

For all FM version the following is correct:

oTR = oDoc.Find(oTR.end, findParams);     // prepare for next find

Klaus

TOPICS
Scripting

Views

263

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 ,
Feb 04, 2018 Feb 04, 2018

Copy link to clipboard

Copied

LATEST

Hi Klaus,

It may have something to do with the FS_FindWrap parameter. The default is true, so the find always wraps around and I wonder if this is what causes the loop. Here is the description from the FDK Reference Manual.

A BoolT flag that determines whether the find operation will wrap when it reaches the location where the search began. Default is True; the find operations wraps. If False, after reaching the location where the search began, the find operation returns an empty F_TextRangeT and FA_errno is set to FE_NotFound.

Rick

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