Windows Command Line Output
[1/4] from: mh983:y:ahoo at: 26-Nov-2001 11:42
Sorry if this has been asked before, but I couldn't find any similar post on eScribe,
so here goes.
I'm using /View on Windows 2000. I have a script that reads filenames from a directory,
combines
their names, then prints out the new string, just using "print". It's very simple.
But if I run this from
a command prompt in Windows 2000, I think it is printing to a REBOL window, then closing
that
window right away. On Unix, the command line works differently and I see what is printed
right there,
as there is no extra window involved.
So as it stands right now, I have a script that works on Linux but not on Windows. To
be more
accurate, it works in both, you just can't see the result in Windows. But nonetheless,
I can't
just take my script to a different OS and run it.
I don't want to put extra code in the script to handle this, but I don't see any command
line option
that would help. Any other ideas?
mike
[2/4] from: amicom::sonic::net at: 26-Nov-2001 10:03
Just put HALT at the point where the script exits. When a VIEW script is
started from an icon, it automatically exits when the program terminates. If
a VIEW script is started from the command line, it returns to the command line
when the script terminates. This is most likely why you are seeing different
behavior.
HALT exits the script to the command prompt no matter how the script was
started.
Have fun!
-Bo
REBOL Consultant
[3/4] from: james:mustard at: 27-Nov-2001 7:12
Hi Mike,
Just put a halt at the end of the script - this will stop execution and
leave the output window open.
James.
[4/4] from: mh983::yahoo::com at: 27-Nov-2001 9:18
Re: Windows Command Line Output (using halt)
Thanks for the responses. I didn't want to use halt, because the script is supposed
to print it's output and exit. If I were running a python
script, I wouldn't want it to leave me in the python interpreter when I was done. Also,
if I put halt in the script, then I'm changing the script
because of the platform it's being run on, and it's no longer platform independent.
Were there technical reasons that prevented the
interpreter in windows from running within a command prompt, rather than it's own window?
Thanks again.
mike