<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: tabstops fld</title></head><body>
<blockquote type="cite" cite>Hello,<br>
<br>
I' have a fld with columns (tabstop property).<br>
I'd like to pick the text of one column.<br>
There is a XFCN from Rinaldi<br>
</blockquote>
<blockquote type="cite" cite>put extractitems(fld
"myFld","2",tab) into txtofColumn2</blockquote>
<blockquote type="cite" cite><br>
Is it possible to write a script that goes even fast ?<br>
Is there a syntax in transcript ?<br>
</blockquote>
<blockquote type="cite" cite>Thanks</blockquote>
<div><br></div>
<div><br></div>
<div>So, with the help of a few emails to the user.list and good
answers from the readers, here is the final script to extract
differents columns of a tab fld :</div>
<div><br></div>
<div><font face="Geneva" size="+2" color="#000000">function
extractItem pFieldName, pItemNumber,delim<br>
local tempLine, tempItem,vListofItems,vListToReturn<br>
repeat for each line tempLine in pFieldName<br>
put "" into vListofItems<br>
repeat for each item tempItem in
pItemNumber<br>
set itemDelimiter to delim<br>
put item tempItem of tempLine
&delim after vListofItems<br>
set itemDelimiter to ","<br>
end repeat<br>
delete last char of vListofItems<br>
put vListofItems& return after
vListToReturn<br>
end repeat<br>
set itemDelimiter to ","<br>
delete last char of vListToReturn<br>
return vListToReturn<br>
end extractItem</font></div>
<div><br></div>
<div><br></div>
<div>Sample :</div>
<div><br></div>
<div>put extractitem(fld 1,"1,2,6",TAB) into anyVar</div>
<div>it extracts from fld 1 a tab-tab-return variable (=anyvar) with
only the columns 1,2,6</div>
<div>and it works fine and fast</div>
<div>For a fld of 50 lines with 10 columns, I reach on a PowerMac G4
800 MHZ the same speed in Revolution (counted in ticks) as with the
external of Rinaldi in Hypercard.</div>
<div>I haven't tried it yet on an iMac G3 400. I'll try it later and
tell you.</div>
<div><br></div>
<div><br></div>
<div>Thanks to all who helped meŠ</div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div>Salutations.<br>
<br>
Yves COPPE<br>
<br>
Email : yvescoppe@skynet.be</div>
</body>
</html>