Highlighted

TextRange problem

Advocate ,
Jan 25, 2016

Copy link to clipboard

Copied

I had reported a strange problem with TextRange in my post "Working off paragraphs in two successive While loops" - which could be bypassed with Russ Wards help.

In a recent discussion in the German Frame users group the root of this problem may have been addressed by Johannes Graubner - albeit related to FameScript (translated by me):

«

The command Find FromTextLoc does not work in FrameScript 6 / FrameMaker 2015 - at least not as documented and working in FrameScript 5.2 and FrameMaker 11.

Find FromTextLoc(lvRange) String(xFM1) NoWrap ReturnRange(lvRangeNew)
ReturnStatus(bStat);

The search does not start at the locaction defined by lvRange, but at the current cursor location.

A workaround is

Find TextRange(lvRange) ScrollTo;
Find FromTextLoc(lvRange) String(xFM1) NoWrap ReturnRange(lvRangeNew)
ReturnStatus(bStat);

Since many script commands are 1:1 transformations of the respctive API commens I assume that this is a FrameMaker problem and hence also exists in ExtendScript. I have reported the bug to Frank Elmore (FrameScript).

»

TOPICS
Scripting

Views

247

Likes

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

TextRange problem

Advocate ,
Jan 25, 2016

Copy link to clipboard

Copied

I had reported a strange problem with TextRange in my post "Working off paragraphs in two successive While loops" - which could be bypassed with Russ Wards help.

In a recent discussion in the German Frame users group the root of this problem may have been addressed by Johannes Graubner - albeit related to FameScript (translated by me):

«

The command Find FromTextLoc does not work in FrameScript 6 / FrameMaker 2015 - at least not as documented and working in FrameScript 5.2 and FrameMaker 11.

Find FromTextLoc(lvRange) String(xFM1) NoWrap ReturnRange(lvRangeNew)
ReturnStatus(bStat);

The search does not start at the locaction defined by lvRange, but at the current cursor location.

A workaround is

Find TextRange(lvRange) ScrollTo;
Find FromTextLoc(lvRange) String(xFM1) NoWrap ReturnRange(lvRangeNew)
ReturnStatus(bStat);

Since many script commands are 1:1 transformations of the respctive API commens I assume that this is a FrameMaker problem and hence also exists in ExtendScript. I have reported the bug to Frank Elmore (FrameScript).

»

TOPICS
Scripting

Views

248

Likes

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
Jan 25, 2016 0

Have something to add?

Join the conversation