Page 1 of 1
Mac OS X and OpenConsole()
Posted: Sun Nov 27, 2011 4:18 pm
by jermcf
I recently installed PureBasic 4.60 demo on an iMac running Mac OS X 7.2 Lion.
It's basically working but the OpenConsole() command does not work. Then looking at the forum I saw it mentioned that this feature is not available on the Mac version.
I am looking for a basic to run on a mac to control stepper motors out the USB port. If the console command does not work what other options do I have?
Otherwise this seems like a deal breaker and I need to look for another basic. I chose PureBasic for evaluation, liking it since it ran on a Mac.
Re: Mac OS X and OpenConsole()
Posted: Sun Nov 27, 2011 7:11 pm
by Ramihyn_
jermcf wrote:I recently installed PureBasic 4.60 demo on an iMac running Mac OS X 7.2 Lion.
It's basically working but the OpenConsole() command does not work. Then looking at the forum I saw it mentioned that this feature is not available on the Mac version.
I am looking for a basic to run on a mac to control stepper motors out the USB port. If the console command does not work what other options do I have?
Otherwise this seems like a deal breaker and I need to look for another basic. I chose PureBasic for evaluation, liking it since it ran on a Mac.
Hello and welcome to the PureBasic forums
Do you really need to open a console or do you just need the "Runprogram" command to control the stepper motors by calling a commandline program?
Re: Mac OS X and OpenConsole()
Posted: Sun Nov 27, 2011 11:07 pm
by jermcf
Thanks for the comment.
I will look into using the command line.
Re: Mac OS X and OpenConsole()
Posted: Mon Nov 28, 2011 1:24 am
by jack
you can kind of fake the console() with the EditorGadget
Code: Select all
If OpenWindow(0, 0, 0,817, 817, "EditorGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered)
EditorGadget(0, 8, 8, 800, 800,#PB_Editor_ReadOnly)
lin.l=0
i.l
For i=1 To 10
AddGadgetItem(0, lin, Str(i)+" = "+StrD(Sqr(i)))
lin+1
Next
Repeat : Until WaitWindowEvent() = #PB_Event_CloseWindow
EndIf
End
Re: Mac OS X and OpenConsole()
Posted: Mon Nov 28, 2011 3:41 am
by USCode
In the documentation it "says" OpenConsole() works for All platforms ... is this a new problem on the Mac or has it never worked?
Even the "Platform-dependent Functions" page in the doc implies this command should work on OS X ...
Re: Mac OS X and OpenConsole()
Posted: Mon Nov 28, 2011 8:21 pm
by michel51
USCode wrote:In the documentation it "says" OpenConsole() works for All platforms ... is this a new problem on the Mac or has it never worked?
Even the "Platform-dependent Functions" page in the doc implies this command should work on OS X ...
It make not sense to use the console on Mac, because it's not the same as on Windows.
OpenConsole() is working on Mac.
Open the console directly - it's a tool - and you can work with it. All outputs are shown, inputs will react (?). Try a small snippet to test it.
But the console in Mac is used for a lot of outputs , as you can see, so it makes no sense to use it often.
Re: Mac OS X and OpenConsole()
Posted: Mon Nov 28, 2011 8:46 pm
by jesperbrannmark
Wow there. stop time for a second....
Terminal in Mac OS X... This is basicly "console", now isnt it?
I wouldnt be surprised (but have no desire to test) if the print() commands etc works fine for console output.
Re: Mac OS X and OpenConsole()
Posted: Mon Nov 28, 2011 11:18 pm
by michel51
jesperbrannmark wrote:
Terminal in Mac OS X... This is basicly "console", now isnt it?
No! Console and Terminal are two different tools.
Terminal is like a "command line" tool, which you cannot use for inputs and outputs from PB.
Run the 3 line code in openconsole(), open the console on your Mac (programms/tools/console) and see the last line.
It is like it is! The console commands are not usable on Mac.
Re: Mac OS X and OpenConsole()
Posted: Sun Dec 04, 2011 6:35 pm
by Shardik
michel51 wrote:jesperbrannmark wrote:
Terminal in Mac OS X... This is basicly "console", now isnt it?
No! Console and Terminal are two different tools.
Terminal is like a "command line" tool, which you cannot use for inputs and outputs from PB.
Run the 3 line code in openconsole(), open the console on your Mac (programms/tools/console) and see the last line.
It is like it is! The console commands are not usable on Mac.
michel51,
sorry that's not correct. Try to use the OpenConsole() command in a
source code and run it from the IDE (for an example and an explanation
take a look into this
posting from me). When opening the console please
examine the window title. It displays "Terminal...". So "Console" and
"Terminal" seem to be used as synonyms on the Mac...

And it's no
problem to use the PB console commands as long as you change
"Executable format" in "Compiler/Compiler Options..." from "MacOS" to
"Console" before compiling...