Forums

How to start with Cobra

General discussion about Cobra. Releases and general news will also be posted here.
Feel free to ask questions or just say "Hello".

Re: How to start with Cobra

Postby archeopteryx » Wed Dec 15, 2010 1:40 pm

Alack and alas: one more tiny hurdle to overcome...

I can copy/paste the "How To" example progs into SciTE, and use "Tools | Run" in the editor to display program output in its "viewing pane" (and at the same time create a corresponding .exe file).

I can successfully run the .exe from a command prompt using Start | Run... and view program output.

On the other hand when i run the same .exe by couble-clicking its icon (black rectangle with horizontal blue stripe at the top) in the explorer window, a "DOS window" opens and shuts immediately, making it impossible to inspect the display.

Is there a "wait" or "don't_close_till_user_enters_a_character" function to prevent the above behaviour?

Thank you,
archeopteryx
archeopteryx
 
Posts: 7

Re: How to start with Cobra

Postby torial » Wed Dec 15, 2010 1:43 pm

Try:
Code: Select all
input = Console.readline
torial
 
Posts: 229
Location: IA

END How to start with Cobra

Postby archeopteryx » Wed Dec 15, 2010 7:40 pm

torial wrote:Try:
Code: Select all
input = Console.readline


Thank you, thank you! :)
I did Console.readLine without an assignment.
It writes output to stdout, and creates a \r\n
The "DOS window" stays open with a blinking cursor
and closes when i press a key.

I daresay no more "alacks" and "alas'es" on this topic.

archeopteryx

PS: I didn't know what to do with CODE: SELECT ALL :?:
archeopteryx
 
Posts: 7

Previous

Return to Discussion

Who is online

Users browsing this forum: No registered users and 7 guests