OpenConsole() issue
Posted: Fri Apr 08, 2011 3:55 am
I am running 4.51 x64 on Mint 10
The OpenConsole() doesn't open anything. Am I missing something?
The OpenConsole() doesn't open anything. Am I missing something?
http://www.purebasic.com
https://www.purebasic.fr/english/
Code: Select all
If OpenConsole()
PrintN("1. Official PureBasic Home")
PrintN("2. Official PureBasic Forums")
PrintN("3. PureArea.net")
PrintN("")
PrintN("Enter a number from 1 To 3 and press Return: ")
Destination.s = Input()
Select Destination
Case "1"
RunProgram("http://www.purebasic.com")
Case "2"
RunProgram("http://forums.purebasic.com")
Case "3"
RunProgram("http://www.purearea.net")
EndSelect
EndIf
End
Thanks for that, Freak. I've been working with this for the past 6 hours without any answer on the threads nor any clue in the documentation... thank goodness Fred pointed out to me where I was going wrong.freak wrote:OpenConsole() opens the channel for console output. If you run the compiled program inside a terminal you will see the console output.
Unlike on Windows, the 'console window' on linux is really an external program (a terminal emulator) in which you must run your program in order to see the output. You cannot start it from inside your program.
Btw, please don't repost the same question in many different topics. You won't get better answers that way. One topic is enough.
But after setting compiler options to "console", the console example program "console.pb" ran just fine. The console was launched from the IDE, although it was a smaller window than my xterm settings give when launching a console in the "normal" way. I'm using Xubuntu 12.04.On Linux and OS X, this command has no effect, as there is no special 'Console' format.