12-15-2005, 06:11 AM
int i inicio hwnd=child
str t1 t2 a.getwintext(hwnd)
str b.getsel
;out "text: %s" a
;out "text selected:[]%s" b
t2.getl(b 0)
for i 0 numlines(a)
,t1.getl(a -i)
,inicio=find(t1 t2)
,if(inicio>=0) break
rep(inicio)
,b-" "
remove_text(b inicio 1)
_s.getl(b numlines(b)-1)
ARRAY(str) c=b
for i 0 c.len
,c[i].get(c[i] 0 _s.len)
b=c
out b