Open Process on OSX

Samuel M. Smith smithsm at samuelsmith.org
Tue Oct 18 23:05:30 EDT 2005


I tried this suggestion but no change in behavior. I think it is a bug.
Since you work for RunRev do you concur? and what will it take to get  
a fix?
Attached is my test stack if that if of any help in verifying.

>
> I think what is happening is that the pointer has moved to the end  
> of the data and there is nothing left to read. I haven't  
> specifically used the "open/read process" commands, but it looks  
> like they function exactly the way opening and reading files does.  
> If so, every read and write moves the current location of the  
> pointer to the end of the string just read or written. When you  
> read the first line, the pointer is at the end of that line.  
> Reading the next line moves it to the end of the second line.  
> Writing a line then moves it to the end of the third line. If you  
> then issue another "read" command, you are at the end of the file  
> and there is nothing to read.
>
> To read the third line in this situation, you must include the  
> "start" position in the "read" command, which should indicate the  
> character offset of the third line. You'll have to parse this. If  
> you are storing the parts you've read so far in a variable, the  
> offset would be the length of the stored variable, for example.



More information about the use-livecode mailing list