Page 1 of 1

How do I open a console Window

Posted: Tue Jan 19, 2016 2:28 am
by Redlion
Hi all,

How do I open a console window in Hollywood 6,

I would like to output some info to the console and be able to see the resulting messages returned.

Not sure where to start with this one. I was trying OpenFile() but with not luck.
Can anyone show me how to do it.

Thanks
Leo

Re: How do I open a console Window

Posted: Tue Jan 19, 2016 4:19 am
by Murmel
sorry Bullshit ;)

Re: How do I open a console Window

Posted: Tue Jan 19, 2016 10:31 am
by Redlion
@ Murmel

??????
@ all,

I think that Console may be the wrong word to use. Shell might be better, I want to see the output from CLI window.

Leo

Re: How do I open a console Window

Posted: Tue Jan 19, 2016 11:19 am
by p-OS

Re: How do I open a console Window

Posted: Wed Jan 20, 2016 7:23 pm
by airsoftsoftwair
You can use DebugPrint() as p-OS suggested or if you want to have full control, you can also open a console file handle using the CON: handler, i.e. something like this:

Code: Select all

OpenFile(1, "CON:0/0/640/480/My console", #MODE_WRITE)
WriteLine(1, "Hello Console!")
FlushFile(1)
...
It's important to call FlushFile() to flush the output into the console window. Check out the AmigaDOS reference manual for the full syntax of the CON: handler. It accepts some other arguments like AUTO, CLOSE, WAIT, SCREEN, etc. See here:
http://wiki.amigaos.net/wiki/AmigaDOS_D ... Output#CON: