Re: Making "read from file" less blocky.

2019-08-04 Thread Richard Gaskin via use-livecode
Tom Glod wrote: > I'm having trouble finding a combination of settings that allows my > file loading to seem to happen in the background. How large is the file? And how is the file structured? -- Richard Gaskin Fourth World Systems Software Design and Development for the Desktop, Mobile, an

Re: Making "read from file" less blocky.

2019-08-04 Thread Bob Sneidar via use-livecode
via use-livecode > wrote: > > Alas, only read from socket allows a message to be sent upon completion. The > step siblings read from file, read from process and read from driver do not. > > Here are a few things you might do: > > 1. Try making the file loading very

Re: Making "read from file" less blocky.

2019-08-04 Thread Dar Scott Consulting via use-livecode
< >> use-livecode@lists.runrev.com> wrote: >>>>> >>>>> OK, here's a "really out there" suggestion >>>>> >>>>> 1. Run a local web server to serve files (locally only). >>>>> >>>>>

Re: Making "read from file" less blocky.

2019-08-04 Thread Alex Tweedly via use-livecode
On 04/08/2019 19:07, Tom Glod via use-livecode wrote: Hmmm interesting. I was sending binary variables to it, and the headers came through ok, but the binary data didn't when it was over a certain size. What sort of data sizes have you been been sending to your httpd standalone? Currentl

Re: Making "read from file" less blocky.

2019-08-04 Thread Tom Glod via use-livecode
ily) via LC and the httpd > library, > >>> > >>> (build that server as a standalone and have it running - started > from your app if need be...) > >>> > >>> 2. in your stack, just do > >>> > >>> load url ("http://loca

Re: Making "read from file" less blocky.

2019-08-04 Thread dsc--- via use-livecode
;> library, >>> >>> (build that server as a standalone and have it running - started from >>> your app if need be...) >>> >>> 2. in your stack, just do >>> >>> load url ("http://localhost:8080/myfilename";) with

Re: Making "read from file" less blocky.

2019-08-04 Thread dsc--- via use-livecode
d handle the file once it has been read in the "mycallback" handler >> >> -- Alex. >> >> >> On 04/08/2019 01:56, Tom Glod via use-livecode wrote: >>> Hey folks, >>> >>> I'm having trouble finding a combination of se

Re: Making "read from file" less blocky.

2019-08-04 Thread Dar Scott Consulting via use-livecode
> > -- Alex. > > > On 04/08/2019 01:56, Tom Glod via use-livecode wrote: >> Hey folks, >> >> I'm having trouble finding a combination of settings that allows my file >> loading to seem to happen in the background. >> >> repeat while read

Re: Making "read from file" less blocky.

2019-08-04 Thread Tom Glod via use-livecode
; >> > >> and handle the file once it has been read in the "mycallback" handler > >> > >> -- Alex. > >> > >> > >> On 04/08/2019 01:56, Tom Glod via use-livecode wrote: > >>> Hey folks, > >>> > >

Re: Making "read from file" less blocky.

2019-08-04 Thread Alex Tweedly via use-livecode
ad in the "mycallback" handler -- Alex. On 04/08/2019 01:56, Tom Glod via use-livecode wrote: Hey folks, I'm having trouble finding a combination of settings that allows my file loading to seem to happen in the background. repeat while read_result is not "eof"

Re: Making "read from file" less blocky.

2019-08-04 Thread Tom Glod via use-livecode
> > On 04/08/2019 01:56, Tom Glod via use-livecode wrote: > > Hey folks, > > > > I'm having trouble finding a combination of settings that allows my file > > loading to seem to happen in the background. > > > >repeat while read_result is not

Re: Making "read from file" less blocky.

2019-08-04 Thread Alex Tweedly via use-livecode
I'm having trouble finding a combination of settings that allows my file loading to seem to happen in the background. repeat while read_result is not "eof" read from file ThisFile for (1024 * 1000) bytes put the result into read_result put it af

Re: Making "read from file" less blocky.

2019-08-03 Thread Jerry Jensen via use-livecode
anks alot! Onward indeed. >> >> On Sat, Aug 3, 2019 at 10:36 PM Jerry Jensen via use-livecode < >> use-livecode@lists.runrev.com> wrote: >> >>> Hi Tom, >>> >>> I’ve done this in the past watching it instead of the result. I seem to >>&

Re: Making "read from file" less blocky.

2019-08-03 Thread Tom Glod via use-livecode
ul. Maybe for a serial port it would be? >> >> As in: >> >> repeat forever >> read from file ThisFile for (1024 * 1000) bytes >> if it is empty then exit repeat >> — do your stuff >> wait 0 with messages >> end repeat >> >> Onw

Re: Making "read from file" less blocky.

2019-08-03 Thread Tom Glod via use-livecode
ead of the result. I seem to > remember eof was not useful. Maybe for a serial port it would be? > > As in: > > repeat forever > read from file ThisFile for (1024 * 1000) bytes > if it is empty then exit repeat > — do your stuff > wait 0 with messages > end r

Re: Making "read from file" less blocky.

2019-08-03 Thread Jerry Jensen via use-livecode
Hi Tom, I’ve done this in the past watching it instead of the result. I seem to remember eof was not useful. Maybe for a serial port it would be? As in: repeat forever read from file ThisFile for (1024 * 1000) bytes if it is empty then exit repeat — do your stuff wait 0 with messages end

Re: Making "read from file" less blocky.

2019-08-03 Thread Dar Scott Consulting via use-livecode
Alas, only read from socket allows a message to be sent upon completion. The step siblings read from file, read from process and read from driver do not. Here are a few things you might do: 1. Try making the file loading very fast and don't do it in the background. Change the cursor if ne

Making "read from file" less blocky.

2019-08-03 Thread Tom Glod via use-livecode
Hey folks, I'm having trouble finding a combination of settings that allows my file loading to seem to happen in the background. repeat while read_result is not "eof" read from file ThisFile for (1024 * 1000) bytes put the result into read_result

Re: read from file until a line begins with a certain word

2017-09-18 Thread Bob Sneidar via use-livecode
How about read for x characters, put the last line in a buffer and remove it from the read text, process the read text, read the next block, prepend the buffer line. Bob S > On Sep 16, 2017, at 17:50 , Matthias Rebbe via use-livecode > wrote: > > Hi, > > until today i used always put URL

Re: read from file until a line begins with a certain word

2017-09-17 Thread J. Landman Gay via use-livecode
On 9/17/17 7:16 PM, J. Landman Gay via use-livecode wrote: You're right of course, I had a thinko. It should have been this, btw: on parseFile put "/path/to/file" into tFile put cr & "mstart" into tDelim open file tFile for read repeat read from file

Re: read from file until a line begins with a certain word

2017-09-17 Thread J. Landman Gay via use-livecode
weird syntax. As far as I know you would need to use something like: local tResult repeat until tResult is eof read from file tFile until tDelim put the result into tResult -- process the text here end repeat -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperA

Re: read from file until a line begins with a certain word

2017-09-17 Thread Matthias Rebbe via use-livecode
t; constant. Really the repeat loop doesn’t know which file the `eof` might be > referring to so it would be pretty weird syntax. > > As far as I know you would need to use something like: > > local tResult > repeat until tResult is eof > read from file tFile until tD

Re: read from file until a line begins with a certain word

2017-09-17 Thread Monte Goulding via use-livecode
esult repeat until tResult is eof read from file tFile until tDelim put the result into tResult -- process the text here end repeat Cheers Monte ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsu

Re: read from file until a line begins with a certain word

2017-09-17 Thread Matthias Rebbe via use-livecode
Jacque, thanks for that code sample. I was not aware that i can use EOF in a repeat loop as condition. I always thought that it only can be used in a read command like read from file MyFile until EOF Thanks again to all who gave feedback. It helped me a lot. Regards, Matthias Matthias

Re: read from file until a line begins with a certain word

2017-09-17 Thread J. Landman Gay via use-livecode
should find the first line as well: on parseFile put "/path/to/file" into tFile put cr & "mstart" into tDelim open file tFile for read repeat until eof read from file tFile until tDelim -- process the text here end repeat end parseFile The only hitch is t

Re: read from file until a line begins with a certain word

2017-09-17 Thread dunbarx via use-livecode
The fact that the keyword both starts lines and is also embedded within lines makes me believe even more that the required processing work within LC, and not in gadgetry in the "read" command. A keyword that starts a sentence may not have a return in front of it. That would only occur if it starte

Re: read from file until a line begins with a certain word

2017-09-17 Thread Paul Dupuis via use-livecode
ntil the next line before “mstart”. >>> Do i have to read line by line and check if the line starts with that >>> keyword or is there also an other way? >>> >>> Maybe i am thinking to complicated. >>> >> Why can you not use the >> read from file

Re: read from file until a line begins with a certain word

2017-09-17 Thread Matthias Rebbe via use-livecode
ead until the line before that line which starts >> with mstart. >> And then read from that “mstart” line until the next line before “mstart”. >> Do i have to read line by line and check if the line starts with that >> keyword or is there also an other way? >> &g

Re: read from file until a line begins with a certain word

2017-09-17 Thread Paul Dupuis via use-livecode
heck if the line starts with that keyword > or is there also an other way? > > Maybe i am thinking to complicated. > Why can you not use the read from file tFilePath until "mstart" of read from {file /pathName/ | stdin} [at /start/] {until {/string/ | end | EOF | empty} | for /amo

Re: read from file until a line begins with a certain word

2017-09-16 Thread Colin Holgate via use-livecode
One thought, what if you read overlapping chunks. Like, read from 0-1, then from 9900-2, etc. If the overlap is longer than your test string you would still be able to pick it up, in the cases where the string spanned the chunk boundary. First test could be to read in 1 chunks and t

Re: read from file until a line begins with a certain word

2017-09-16 Thread dunbarx via use-livecode
I would just read the whole file and then let LC truncate the text following the keyword sentence in the usual ways. I bet even with a couple of gigabytes this would not take much time. Craig Newman -- Sent from: http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html

read from file until a line begins with a certain word

2017-09-16 Thread Matthias Rebbe via use-livecode
Hi, until today i used always put URL to read a complete file into memory. But now i have to process really large text files with a size of 900 - 1500 MB. I know i can read a file until EOF or so. But how would i read a file until a line that starts with a certain keyword, e.g. mstart. I need

Re: An anomaly in the "read from file" command?

2017-04-25 Thread Mark Waddingham via use-livecode
On 2017-04-26 08:35, Quentin Long via use-livecode wrote: ask file "What do you want to read?" put it into DisFile read from file DisFile until EOF put it into fld "This Field" Why didn't I get an error message when I tried to read from a file that hadn't been

An anomaly in the "read from file" command?

2017-04-25 Thread Quentin Long via use-livecode
want to read?" put it into DisFile read from file DisFile until EOF put it into fld "This Field" What went into field "This Field" was the contents of the *variable* DisFile, *not* the contents of the *file* whose name is stored in the variable DisFile. This is because

Re: Read from file

2016-11-30 Thread Bob Sneidar
have to check that >> the error is unexpected and doesn't contains "eof". >> >> Kind regards, >> >> Mark Schonewille >> http://economy-x-talk.com >> https://www.facebook.com/marksch >> >> Buy the most extensive book on the >> Live

Re: Read from file

2016-11-29 Thread Peter Bogdanoff
om > https://www.facebook.com/marksch > > Buy the most extensive book on the > LiveCode language: > http://livecodebeginner.economy-x-talk.com > > Op 30-Nov-16 om 01:12 schreef Peter Bogdanoff: >> When I use: >> >> read from file tURL until eof >> >> t

Re: Read from file

2016-11-29 Thread Mark Schonewille
sn't contains "eof". Kind regards, Mark Schonewille http://economy-x-talk.com https://www.facebook.com/marksch Buy the most extensive book on the LiveCode language: http://livecodebeginner.economy-x-talk.com Op 30-Nov-16 om 01:12 schreef Peter Bogdanoff: When I use: read fro

Read from file

2016-11-29 Thread Peter Bogdanoff
When I use: read from file tURL until eof to read from a file on disk, should I expect the to always contain “eof”? I’m suspecting there could be a a file read error while reading thousands of files and I want to catch that.What should I expect to see in the result when that happens? Peter

Re: Read From File

2015-06-18 Thread Bob Sneidar
an OK button? Bob S On Jun 17, 2015, at 16:17 , Peter Haworth mailto:p...@lcsql.com>> wrote: After issuing the command "read from file tFilepath until EOF", I am getting "OK" in the it variable instead of the file contents. I don;t see this documented in the dictio

Read From File

2015-06-17 Thread Peter Haworth
After issuing the command "read from file tFilepath until EOF", I am getting "OK" in the it variable instead of the file contents. I don;t see this documented in the dictionary so can anyone tell me what this means? This is with LC 6.6.5 on OSX 10.10. The file is empty at