April 25, 2024, 02:26:13 AM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


End Prompt

Started by billhsln, July 16, 2014, 03:14:46 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

billhsln

I am running the most current version IWB.  My question is, when I create a console program, some times I have it ask to hit a key and it asks again and some times it does not.  Is there a switch that I need to either turn on or off?  The reason I ask, I have some programs that I don't want to have it ask me to press any key, I just want them to end and they end up asking me even when I don't ask for it.  And some times it ends up asking because I request it and then it asks again, which is annoying.

Thanks,
Bill
When all else fails, get a bigger hammer.

LarryMc

Let's see if I can explain it correctly.
When you compile a program as a console application you are always going to get a "Press any key to continue . . ." message; Period!  It is internally programmed that way. And the message is generated when the END statement is encountered.

It you precede the END statement with WAITCON or DO:UNTIL inkey$<>"" then you will get that prompt also just prior to the one above.

Now, if you have a "console" program(no windows other than maybe a messagebox) you can compile it as a windows application.

Now, when the END statement is encountered the console window will close, if it was open.
In this case the console window will open only if you print to it or you use the OPENCONSOLE statement.
You can use the WAITCON command to require the user to hit a key to close the window.
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library