QuestionHelpEuphoria (How do I disable input into dos window?)

Posts 17 of 7 · Page 1 of 1
Euphoria (How do I disable input into dos window?)
Code:
#!/home/euphoria-4.0b2/bin/eui

puts(1, "Test!")
if getc(0) then end if --Keep window open until 'Enter' is pressed
Just a simple bit of code that opens a dos window, displays "Test!", and waits for Enter to be pressed then closes. I want to know how to disable user-input into the dos window.
if getc(0) then end if

If there is a "User input" then continue on with the script. So to do what you're trying to do, use something else than getc.

What you're asking is not exactly clear though. What are you trying to do? I have a feeling you're not using the right means to your end.
@fuzzayboy Wow! I can't believe I was so stupid as to overlook getc(0) being what's keeping the window open (like i was originally intending to do), but also waiting for a keypress to continue.

My goal is to just keep the window open. I don't want any user input in this dos box. I just want to print stuff willy-nilly (if you get my meaning).
Still need help, however. Bump... I swear I'm not doing this on purpose. Shit is hard to find.
You are compiling a console application.
By design the "standard output window" is closed when the program is terminated. It also doesnt allow input by default (i wont talk about cmd options)
If you want to keep the window opened just let the program run , do not terminate it.

while(true)
{
processing
}

User will need to press ALt+F4 or the red cross to close it.

But most of the time its an horrible way of programming. You should put some failsafe mechanism in "processing" in order to avoid terrible side effects like infinite loops. The program must be able to break free from the loop in case of error and exit properly. Or just DONT DO THAT !

If i where you, i would simply launch the compiled program from the a bat/cmd file . It should work with a "pause "command in the cmd script..wait.... pause will still require user input haha
Posts 17 of 7 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

Need help?