Procedurally inserting text into a muli-style variable

Piotr (4/23/14 5:21PM)
Keisuke Miyako (4/24/14 3:21AM)


Piotr (4/23/14 5:21 PM)

Hi,

I want to procedurally insert text into a multi-style variable. I
determine
the insertion point by the command get highlight. This command doesn't
take
style tags into account. Then I want to manipulate (insert) text at the
insertion point by using substring. However, now the style tags ARE
taken
into account and the text is inserted at the wrong position.

Am I doing anything wrong? Is there another, better way to handle this?

Thanks in advance,

Piotr Chabot Stadhouders

Timeff

The Netherlands

Keisuke Miyako (4/24/14 3:21 AM)

short answer is yes (sorry) you should not use plain string commands
(like
substring) to process style text.

use commands designed for style text,

OBJECT SET STYLED TEXT (v12/v13)

ST SET TEXT (v14)

OBJECT SET PLAIN TEXT (v12/v13)

SET SET PLAIN TEXT (v14)

notice in v14 you have constants to specify the ?=A2?=82=C5ìcurre
nt
position?=A2?=82=C2ù, so you
can skip GET HIGHLIGHT if the goal is simple replacement/insertion.

miyako

On 2014/04/24 0:21, "Piotr" <p.stadhouders@... wrote:

color><param>00000,0000,DDEE/param>AAm I doing anything wrong? Is
there another, better way to handle this?
/color>

Reply to this message

Summary created 4/24/14 at 5:21AM by Intellex Corporation

Comments welcome at: feedback@intellexcorp.com