convert [*] to the n with tab
rev at armbase.com
rev at armbase.com
Mon Aug 29 07:04:28 EDT 2005
Quoting Eric Chatonet <eric.chatonet at sosmartsoftware.com>:
> Hi Bob,
Hi Eric
One again you have saved the day. I ended up with
on mouseUp
put replaceText(field "preparsed","\[3\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[1\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[2\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[4\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[5\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[6\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[7\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[8\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[9\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[0\]\[0\]\[0\]\[0\]","[0]")into field
"withtabs"
put replaceText(field "withtabs","\[0\]\[0\]\[0\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[0\]\[0\]","[0]")into field "withtabs"
put replaceText(field "withtabs","\[0\]",tab)into field "withtabs"
end mouseUp
Now works perfect
This replaces all the non-[0] with [0] and then changes multiples of
[0] to one
single [0]. Then changes them to tab.
Cheers
Bob
More information about the use-livecode
mailing list