It is currently Mon Jan 18, 2021 8:33 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Opening a console?
PostPosted: Thu Nov 12, 2020 9:42 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Sep 18, 2013 11:54 am
Posts: 432
Location: France
Code:
OpenConsole()

PrintN("Blah blah!")

Delay(5000)


That should work even if the program is not compiled in "Console" mode, right?
I'm on a Pixelbook, with the Linux beta stuff, and I cannot manage to open a console. Would be useful to do some unit tests.

Thanks.


Top
 Profile  
Reply with quote  
 Post subject: Re: Opening a console?
PostPosted: Sat Nov 14, 2020 10:20 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Wed Jun 25, 2014 5:25 pm
Posts: 430
Location: Germany
I once wished for this feature too and Fred implemented it, but in a later PureBasic (beta?) version he removed it again, because it probably caused problems.

I can not find my feature request here in the forum anymore. He apparently deleted the request after he integrated the feature.

_________________
Image
Why OpenSource should have a license :: DarkColor-Scheme for PureBasic
PureBasic-CodeArchiv-Rebirth: Git-Repository / Download – Any help is welcome!
Manjaro Xfce x64 (Main system) :: Windows 7 x64 (VirtualBox) :: Newest PureBasic version


Top
 Profile  
Reply with quote  
 Post subject: Re: Opening a console?
PostPosted: Sat Nov 14, 2020 2:21 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Sep 18, 2013 11:54 am
Posts: 432
Location: France
Hmm? That’s a bit strange, Linux is mentioned in the OpenConsole() documentation page, and it even returns 1, so I think it should work and the problem comes from something else, like a missing package or a denied access?


Top
 Profile  
Reply with quote  
 Post subject: Re: Opening a console?
PostPosted: Sat Nov 14, 2020 6:28 pm 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Fri Apr 25, 2003 4:34 pm
Posts: 1030
Location: Canada
From HELP file...

Quote:
On Microsoft Windows, there are two different executable formats: Win32 and Console. If you want to create a standard console application, like 'dir', 'del' etc. you must compile the executable using the 'Console' format (Compiler Option menu in the PureBasic IDE). On Linux and OS X, there is no special Console format however setting the Compiler option to 'Console' will launch a terminal window automatically when you run your program from the IDE.


When I test on both Linux and MacOS it works as the help file says.

_________________
Image Image


Top
 Profile  
Reply with quote  
 Post subject: Re: Opening a console?
PostPosted: Sat Nov 14, 2020 6:43 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed Sep 18, 2013 11:54 am
Posts: 432
Location: France
Doesn’t work either.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye