I'm working on small "front-end" stack for a computation program which takes
around one hour to execute. I had problems with the colors, it is solved,
I used: set colors of stack "my mainstack" to colors of stack "Home" and it
worked fine.
Now I'm having problems getting the output of my program where and when I
want to. Here'e an excerpt of the script for the "OK" button:
on mouseUp
...
lock screen
show field "echo"
unlock screen
put shell("echo $HOME\\c") into homd
put "(" & homd & "/bin/solve -n 15 -d" && field "debit" && "-p" && field "angle" && \
"-w" && field "omega" && ") 2> erreurs" into goforit
open process goforit for read
repeat forever
read from process goforit for 1 line
if it is empty then
close process goforit
exit repeat
else put it after field "echo"
end repeat
beep 2
...
end mouseUp
This is very similar to the "OK" button of the "Sample Files Dialog" stack.
However the command:
$HOME/bin/solve -n 15 -d "debit" -p "angle" -w "omega"
takes around one hour to complete and I would like to get the stdout, which
inform the user about the state of the computations, into the field "echo"
along the way. This command also produce output on stderr which I would like
to redirect to a file (erreurs). Until now I only managed to make it work
by putting exactly the command above without redirections into goforit. I
then get stderr into field "echo" as soon as it is produced and stdout only
at the end of execution. What should I do?
Thanks
Luc
-- marcouil@ireq.hydro.qc.ca