New Library - ConsoleX

Developed or developing a new product in PureBasic? Tell the world about it.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

New Library - ConsoleX

Post by DoubleDutch »

Here is a new library for you all... :)

http://www.doubledutchdesigns.com/download/ConsoleX.zip

-Anthony
User avatar
tinman
PureBasic Expert
PureBasic Expert
Posts: 1102
Joined: Sat Apr 26, 2003 4:56 pm
Location: Level 5 of Robot Hell
Contact:

Post by tinman »

Well...what does it do?
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Post by Sveinung »

Doesn't seem to work... I use PB 3,91b.

I get an empty error requester, saying nothing...

So this is kind of useless for me...compiled example works fine!
That looked nice!

Sveinung
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Sveinung:I have 3.91b1 and it works np.
I will try it on my other PC in the morning....

strange...

tinman: if you run the example you will see that its basically an easy console replacement - by this I mean if you have written a program with console and want to update it quickly you can do it with the commands given. You just add an X to the usual PureBasic console commands.
After you have done this the program can have any of the normal windows functions. The OpenConsoleX command returns the Window number - you can use WindowID() with the result to get the windows handle.
I used it to update a program I did a few weeks ago - it was very easy, console programs can be updated in a matter of minutes. They look much better and you can full screen them with the full screen windows icon, or zoom them to whatever size you want - just resize the window.
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

I have updated the library to V1.02 :)

http://www.doubledutchdesigns.com/download/ConsoleX.zip

Hopefully this may fix the problem that Sveinung had - please you you try it & and tell me if its now okay?

Also in V1.02 the OpenConsoleX command has been extended with optional parameters:

Code: Select all

result=OpenConsoleX([sizex,sizey][,x,y,w,h,title$])
optional sizex,sizey in characters
further optional window x,y,w,h and title!!!

TailBite is REALLY good, thanks Miguel aka "El_Choni" :)
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

..

Post by NoahPhense »

DoubleDutch wrote:TailBite is REALLY good, thanks Miguel aka "El_Choni" :)
El Rulez!! TailBite does kick as$..

- np

checking out your consoleX now
User avatar
NoahPhense
Addict
Addict
Posts: 1999
Joined: Thu Oct 16, 2003 8:30 pm
Location: North Florida

Re: New Library - ConsoleX

Post by NoahPhense »

DoubleDutch wrote:Here is a new library for you all... :)

http://www.doubledutchdesigns.com/download/ConsoleX.zip

-Anthony
kewl concept

- np
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks! :)

Glad to see it worked...

I will add some more commands now that will allow people to make programs originally written for console mode to be more "pleasant" to the eye.

l8r

Anthony
PWS32
User
User
Posts: 85
Joined: Sat May 10, 2003 1:02 pm
Location: Germany

Post by PWS32 »

Hi,
very very nice !!

can you include any functions ?

- SetCursorColorX
- SetCursorFlashX
- HideWindowTiltelbarX
- HideWindowFrameX
- SetSoftscrollTextX

Best Regards,
Peter
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

Thanks for the suggestions, some good ideas there. :)

I will make the OpenConsoleX function a little better - I will add FLAGS, so you can add stuff like a regular window - or take stuff away

This should be in by tonight - if i have any spare time.

If you use the returning result code, you can get the windowID with

Code: Select all

result=OpenConsoleX()
if result
  winid=WindowID(result)
.
.
  etc...
.
.
endif
CursorColorX(n) should be fairly easy - will do...
CursorFlashX(n) should be fairly easy - if its looping in "InputX()" or "DelayX(n)"
ConsoleTitle(string$) can be extended to make it slightly better

I will think about scrolling, but i never liked that about the original Console window - fixed screens seem better for apps.
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Hi!
Nice library. So this use directX? Look at my console library; consoleExtended, maybe we can work together and make this to librarys to one! My library: viewtopic.php?t=11267
Bonne_den_kule
Addict
Addict
Posts: 841
Joined: Mon Jun 07, 2004 7:10 pm

Post by Bonne_den_kule »

Which directx is the requriments?
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

It just uses the normal 2D library and 2D sprites using purebasic, so I guess it uses DirectX 7 as a minimum - this is a quote from the PureBasic help:
This command tries to initialise DirectX 7
I will be putting more error checking into newer versions - I just wanted something to work for my own apps before now.

Your ConsoleExtended library is pretty cool too, yours is mainly for people who still want to use the real console mode - this library is just really useful for people who have programs written for console mode who don't need run in console mode anymore. They just want a "quick n dirty" way of upgrading them without too much hassle...

If you really want to merge the two libraries, I reckon it would be better if we both talk to Fred about how it will fit in with his plans - I'm sure he has ideas about what direction he would like the console library to go?

-Anthony
User avatar
DoubleDutch
Addict
Addict
Posts: 3220
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Post by DoubleDutch »

New version (v1.03) :)

Now you can OpenConsoleX and set the windows flags!!!

Code: Select all

#window=OpenConsoleX([sizex,sizey][,x,y,w,h,title$][,Flags])
If you download the library zip from:
http://www.doubledutchdesigns.com/download/ConsoleX.zip

and look at example4.pb you will see how you can mix ConsoleX commands with PureTools commands. :)
* you do of course need the puretools library to do this! *

l8r

Anthony
User avatar
Sveinung
Enthusiast
Enthusiast
Posts: 142
Joined: Tue Oct 07, 2003 11:03 am
Location: Bergen, Norway

Post by Sveinung »

@DoubleDutch

Works fine with your new version!!!

Don't know what it was....but who cears
Works fine now!

Regards
Sveinung
Post Reply