Reading from file/stdin non-blocked?

K nnoydb at excite.com
Wed Oct 27 14:16:56 CDT 2004



I will test this in my situtation and post the results.  Thanks!


-==-=-=-=-=-=-==-=-=-=-=-=-=-=-==-=-=-=-=-=-
Disclaimer:

Any resemblance between the above views and those of my
employer, my terminal, or the view out my window are purely
coincidental. 
Any resemblance between the above and my own views is non-deterministic.

 The question of the existence of views in the absence of anyone to hold
them
is left as an exercise for the reader. The question of the existence of
the reader
 is left as an exercise for the second god coefficient. 
(A discussion of non-orthogonal, non-integral polytheism is beyond the
scope of this article.)



 --- On Wed 10/27, Gordon Tillman < got at mindspring.com > wrote:
From: Gordon Tillman [mailto: got at mindspring.com]
To: nnoydb at excite.com, use-revolution at lists.runrev.com
Date: Wed, 27 Oct 2004 14:09:39 -0500
Subject: Re: Reading from file/stdin non-blocked?

Howdy K.<br><br><br>On Oct 27, 2004, at 14:04, K wrote:<br><br>><br>> Is the user space accessible with out the RR IDE?<br><br>I think you may have to.  Here is all of the stuff from the script file.<br><br>--gordy<br><br>constant kReadIntervalSecs = 2<br>constant kTimeoutMS = 1<br><br>local sPath, sDone, sPos<br><br><br><br>on LogIt pMsg<br>   put pMsg & return after field "statusLF"<br>   set the scroll of field "statusLF" to the formattedHeight of field <br>"statusLF"<br>end LogIt<br><br>on StartRead<br>   put false into sDone<br>   answer file "Select a file"<br>   put it into sPath<br>   if sPath is not empty then<br>     put false into sDone<br>     open file sPath for text read<br>     put 1 into sPos<br>     send "ReadFile"<br>   else<br>     put true into sDone<br>   end if<br>end StartRead<br><br>on StopRead<br>   put true into sDone<br>   if sPath is not empty then<br>     close file sPath<br>     put "" into sPath<br>   end if<br>end StopRead<br><br><br><br><br>on ReadFile<br>   if sDone then exit "ReadFile"<br><br>   local tDat, tRes<br><br>   read from file sPath at sPos until return in kTimeoutMS milliseconds<br>   put the result into tRes<br>   put it into tDat<br>   add the length of tDat to sPos<br>   replace return with "" in tDat<br>   if tDat is not empty then LogIt " DATA=" & tDat<br>   if not sDone then<br>     if tRes is empty then<br>       send "ReadFile" to me<br>     else<br>       send "ReadFile" to me in kReadIntervalSecs seconds<br>     end if<br>   end if<br>end ReadFile<br><br>

_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!


More information about the use-livecode mailing list