I am trying to create a script that would delete all the strike thru text in an attibute.
So far I have tried to use findRichText() in this :
====================================================
Module m=current
string s, i, mods, result
RichText rt
Object o
int begin=0
int offset
int len
for o in m do {
s = richText(o."Object Text")
Buffer buf = create
for rt in s do {
if (rt.strikethru )
{print rt.text " is strike\n"
i = rt.text
if (findRichText(s, i, offset, len, false)) {
result = replaceRichText(s, offset, len, "")
buf+=sbegin:offset-1
begin=offset+len
}
}
}
buf+=sbegin:
mods = stringOf(buf)
o."output"= mods
delete buf
}
=========================================================================
As a result I get a string with all the RTF Tags :
\strike0 the HMI behavior (rendering) according the set values in the presented interface by the widget.\par
\strike\par
}
Adding "mods = richText(mods)"
I get more Tags :
\\strike0 the HMI behavior (rendering) according the set values in the presented interface by the widget.\\par
\\strike\\par
\}
In addition I think I will need to use RichTextWithOle to display the OLEs....
Thank you if you jhave a clue what I am missing....
sadoug - Tue Mar 06 11:18:58 EST 2012 |