Making "read from file" less blocky.

Jerry Jensen jerry at
Sat Aug 3 22:36:33 EDT 2019

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 repeat

.Jerry non-sphere (tetrahedron?)

It was a long time ago in, I think, LC 5, so YMMV.

> On Aug 3, 2019, at 5:56 PM, Tom Glod via use-livecode <use-livecode at> 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"
>         read from file ThisFile for (1024 * 1000) bytes
>         put the result into read_result
>         put it after IntoThisVariable
>         add length(it) to amount_read
>         TSTProgress amount_read,ExpectedSize,"%","Loading File ..."
> (Progress Indicator Handler)
>         wait 10 milliseconds with messages
>      end repeat
> no matter what I try, its still sluggish, and it seems like messages are
> still accumilating instead of being processed by the engine.
> Am I missing something?  Normally waiting with messages sufficiently frees
> the engine to allow the UI to remain responsive.
> Thanks,
> Tom
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:

More information about the Use-livecode mailing list