[console] open, close, trace, view, capture output, crypto, carl, issue,
[1/5] from: rebol::meurrens::org at: 12-May-2003 9:55
Hello all,
I have a double question regarding the use of the console
when running a script under VIEW.
(thus a script intended for a end user, with GUI)
1.1) ==== the problem 1 (part of my crypto project, but could be elsewhere)
Some special functions like the key pair generation functions
in the cryptographic library may take a long time to complete.
They write during the execution some characters on the console
(such as -----+----------+---+.... )
See the image (much better than words...)
http://rebol.mksa.net/img/crypto-issue-2.jpg
to understand what I mean.
Unfortunately, when they complete, the console remains visible.
[ I would, of course, prefer to capture the execution "ticks" in a progress bar
functionnality, but this is another story...]
This is an issue fully described at URL
http://rebol.mksa.net/test-crypto.r?help
Mind that this page reports (first) a "bug" and (then) an "issue".
My question here is only related to the "issue".
(of course you may be interested by the bug report too, but this is only
for crypto experts)
1.2) ==== my question
Does somebody on this list know how to avoid writing on the console,
how to capture such output, how to close the console without closing the
main window, etc ???
2) ==== reverse problem (within my project : computer aided rebol learning,
he! it makes CARL :-) ...)
In this case, I run a GUI script (under VIEW or even within a Win32
compiled program)
and, for pedagogical reasons, from time to time, I want to open the console,
(say: to let a student try some statements)
and, after some action (such as typing 'exit-console' or something like that)
from the user, close the console.
2.2) ==== my question (very similar to 1.2)
How do I open and close the console from within my script ?
Well, I can open it by printing something. Fine.
But, for now, I can give the control to the user only by making
voluntary an error within the script.
But this is really not neat !!!
And, when the user (the student) runs the following script,
I am not able to let the console disappear.
==============
Thanks to all for your help.
Btw, I throw this thread with the subject headed [console]
and I already promise to publish a "final" message
with the subject headed [console/synthesis/marc/15-May-2003]
when I'll receive your comments (the date is of course fictive... we'll see
when we get all answers...)
Cordially
</marc>
Marc Meurrens
TEL: +32 (0)2 537 2812
FAX: +32 (0)2 537 7645
GSM: +32 (0)475 46 2812
EMAIL: [marc--meurrens--org]
URL: http://www.meurrens.org/
PGPKEY: http://www.meurrens.org/pgp/
Please don't mail me attached files, instead, use my 'exchange area' :
EXCHANGE AREA: http://www.meurrens.org/exchange/
(HTTP/FTP upload/download of temporary/persistent files)
[2/5] from: maarten::koopmans::surfnet::nl at: 12-May-2003 13:54
Re: [console] open, close, trace, view, capture output, crypto, carl, is
Marc,
Have you tried this with the "quiet" option when running REBOL? I
reported the bug some time ago (actually, it was a bug in the Command
2.0 versions that somehow propagated back to the SDK).
--Maarten
[3/5] from: g::santilli::tiscalinet::it at: 12-May-2003 15:58
Re: [console] open, close, trace, view, capture output, crypto, carl, i
Hi Marc,
On Monday, May 12, 2003, 9:55:14 AM, you wrote:
MM> Does somebody on this list know how to avoid writing on the console,
MM> how to capture such output, how to close the console without closing the
MM> main window, etc ???
You cannot close the console window AFAIK, however you can
redirect
any console output by replacing system/ports/output.
(You could for e.g. write a little port handler that just inserts
all the input into a string; then you can use it to capture your
output into a string.)
MM> and, for pedagogical reasons, from time to time, I want to open the console,
MM> (say: to let a student try some statements)
MM> and, after some action (such as typing 'exit-console' or something like that)
MM> from the user, close the console.
Maybe you could do the same way as /Link does when opening the
console, i.e. it just launches a script that HALTs. This gives you
a new REBOL process with the console open; anything done at the
console wouldn't interfere with your program.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r
[4/5] from: greggirwin:mindspring at: 12-May-2003 10:49
Hi Marc,
Not any easy solutions that I know of, but I agree with Gabriele about
trying LAUNCH.
Cyphre wrote a virtual console in View some time ago, but I'm not sure
how far along he got it, or whether it's something he wants others to
use. You might ask him, or maybe he'll chime in here (he's very busy
lately though).
-- Gregg
[5/5] from: gchiu:compkarori at: 15-May-2003 9:29
On Mon, 12 May 2003 09:55:14 +0200
Marc Meurrens <[rebol--meurrens--org]> wrote:
>a long time to
>complete.
>They write during the execution some characters on the
>console
>(such as -----+----------+---+.... )
Marc,
Why don't you use the view progress bar gadget instead of
writing to the console?
>and, for pedagogical reasons, from time to time, I want
>to open the console,
>(say: to let a student try some statements)
>and, after some action (such as typing 'exit-console' or
>something like that)
>from the user, close the console.
I think the current SDK Encap license forbids opening up a
console as it then means users have access to /Pro
functionality.
--
Graham Chiu
http://www.compkarori.com/vanilla
Rebol Encyclopaedia Project