<!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
&quot;myFld&quot;,&quot;2&quot;,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>
&nbsp; local tempLine, tempItem,vListofItems,vListToReturn<br>
&nbsp;&nbsp; repeat for each line tempLine in pFieldName<br>
&nbsp;&nbsp;&nbsp;&nbsp; put &quot;&quot; into vListofItems<br>
&nbsp;&nbsp;&nbsp;&nbsp; repeat for each item tempItem in
pItemNumber<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set itemDelimiter to delim<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; put item tempItem of tempLine
&amp;delim after vListofItems<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; set itemDelimiter to &quot;,&quot;<br>
&nbsp;&nbsp;&nbsp; end repeat<br>
&nbsp;&nbsp;&nbsp; delete last char of vListofItems<br>
&nbsp;&nbsp;&nbsp; put vListofItems&amp; return after
vListToReturn<br>
&nbsp; end repeat<br>
&nbsp; set itemDelimiter to &quot;,&quot;<br>
&nbsp; delete last char of vListToReturn<br>
&nbsp; return vListToReturn<br>
end extractItem</font></div>
<div><br></div>
<div><br></div>
<div>Sample :</div>
<div><br></div>
<div>put extractitem(fld 1,&quot;1,2,6&quot;,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>