convert [*] to the n with tab
rev at armbase.com
rev at armbase.com
Mon Aug 29 04:45:36 EDT 2005
Quoting rev at armbase.com:
> Hi All.
>
> I have a field with text items separated with charachters bounded by
> multiples
> of [*].
>
> eg
> [0][0][9]item1[0][0][0][6]item2[0]item3
>
> I would like the separator items [*] or [*][*] or [*][*][*] etc to be
> replaced
> with a single tab.
> I thought of this script
>
> on mouseUp
> put "preparsed" into p -- insert your field name here
> put empty into v
> repeat with x = 1 to the number of lines of fld p
> --put empty into v
> get line x of fld p
> replace [*] with \
> end repeat
> end mouseUp
>
> However I keep getting the error
>
> compiling at 9:18:04 AM
> Type Expression: bad factor
> Object convert [*]n to tab delimiter
> Line replace [*] with \
> Hint [
>
> Any ideas. Is it the case that I cant use [ as a charachter? It was
> inserted OK.
I also tried
on mouseUp
put "preparsed" into p -- insert your field name here
repeat with x = 1 to the number of lines of fld p
get line x of fld p
replace "[*]" with "\" in
end repeat
put it into field "withtabs"
end mouseUp
And tried
on mouseUp
put "preparsed" into p -- insert your field name here
replace "[*]" with "\" in fld p
put fld p into field "withtabs"
end mouseUp
No Luck.
Cheers
Bob
>
> All the best
> Bob
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
More information about the use-livecode
mailing list