Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / DBP_NETLIB v1 - New Plugin for Dark Basic Pro

Author
Message
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd May 2004 04:54 Edited at: 4th May 2004 17:44
DBP_NETLIB_v1 - .NET LIBRARY PLUGIN FOR DARK BASIC PROFESSIONAL
---------------------------------------------------------------
DBP_NETLIB.DLL – by CattleRustler (VB.NET)
DBP_NETLIB_CPP.DLL - by Exeat (C++)

THE LIBRARY:
Below is a listing of the library functions arranged by category.

Try it out - it's free
Fully documented. Click the logo below.
We've only just started. More to come...


* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 3rd May 2004 10:01
Thank you!
How about adding a setw() string function like in c++?
I will test this out as soon as I can.

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 3rd May 2004 11:25
had a look at the docs, looks like a lot of nice features!

what are you planning to add in the future?

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
Dostej
21
Years of Service
User Offline
Joined: 21st Jan 2003
Location: Switzerland
Posted: 3rd May 2004 11:39
Look impressive - dl it now

To code or not to be...
GALACTIC X - A brief overview - http://www.angelfire.com/space2/galactix also my IDE: jaPROe - the Image Enhance plugin and some snippets and tools -
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd May 2004 15:14 Edited at: 3rd May 2004 15:56
new stuff will be announced very soon
thanks for dloading

EDIT: added a new function fil_OutputFile
lets you write data to a file. if the file doesn't exist its created, if it does already exist it is deleted and recreated. I will add this to the dll download soon along with some new stuff.


** DBP_NETLIB_v1 PLUGIN - FULL VERSION RELEASED! ** Mooooooo!
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th May 2004 03:15
version 1.1 has been sent off to Exeat for C++ wrapping
Hopefully tonight it will be on my site for download. The aforementioned new file function and an *ALL NEW* feature is included as well...




* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th May 2004 17:47
@Lost In Thought:

could you explain the setw() function. From what I read it's like some form of a field limiter for strings? I could mimic this functionality with a Pad function but I don't understand fully what the c++ version is doing.

thanks


* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 4th May 2004 23:49
Adds blank spaces to make all the strings the same length. To line them up in a column. When I get home I will post the c++ code and the results of how it is used if need be. I have a work around in DBP now but it is too slow. I think this plugin could do it a lot faster.

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th May 2004 00:11
ok, that's like VB PAD function. No need to post the C++ code but a snippet of result would be cool. I get it though. I was thinking about adding a pad function anyway so I'll definitely add it now.

Thanks


* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th May 2004 00:32
@L.I.T.

Ok I added 2 functions: str_PadLeft() & str_PadRight()

Args
Str: the string to modify
PadChar: the padding character to use
TotalWidth: the total length of the string returned

Pads the specified string with the specified character to create a string whos total length is equal to TotalWidth. PadLeft right-aligns the string with the padding chars on its left - PadRight does the exact opposite

str_PadLeft("Hello","x","10") would yield: xxxxxHello
str_PadRight("Hello","x","10") would yield: Helloxxxxx

expect it in release version 1.1

cheers


* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
M00NSHiNE
20
Years of Service
User Offline
Joined: 4th Aug 2003
Location: England, UK
Posted: 5th May 2004 01:25
Shame I dont have DBPro yet... I really want to test this out.. What the hell I'll d/l it anyways

CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th May 2004 01:32



* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 5th May 2004 02:25
Quote: "Adds blank spaces to make all the strings the same length. To line them up in a column. When I get home I will post the c++ code and the results of how it is used if need be. I have a work around in DBP now but it is too slow. I think this plugin could do it a lot faster"


Why not write your own plugin? Sounds like you would have the c++ knoledge.

i won't see you in the pit
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 5th May 2004 02:38
update: added a function called tc_StrToFlt() which converts (you guessed it) a string to a float

(for 1.1)


* DBP_NETLIB_v1 - PLUGIN FOR DBP * Click LogoMooooooo!
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 5th May 2004 06:59
I don't have any experience with making dll's and no knowledge of wrappers or anything like that. I have only used c++ for parsing and other text type stuff. But I will be rich one day and not have to work so much. Then I can finish learning c++

The code and results are:

Code


prints


"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 5th May 2004 15:43 Edited at: 5th May 2004 15:45
You might also want to think about adding .NET Speech system (seeing as Microsoft doesn't want to update the standard SDK anymore) - if so, then if you can make sure that yours has the same names & parameters, I can then deapreciate mine.


The place for all great plug-ins.
The Coding Area - From my brain to your browser...
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 6th May 2004 18:22 Edited at: 6th May 2004 18:23
tca that's a thought

In case anyone is interested I posted the documentation for our library as an html page as well as included in the library zip, so you can view the docs without downloading the zip, if you like.

http://www.mod2software.com/dbp/dbp_netlib.htm


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 7th May 2004 00:08
Let me know, and I'll send the complete project.


The place for all great plug-ins.
The Coding Area - From my brain to your browser...
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 02:46
Thanks. I wrote it down so I don't forget! Exeat and I are trying to sort ot something first with a feature we are trying to inlude.

thanks again


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th May 2004 05:32 Edited at: 7th May 2004 05:33
Are you going to be able to add a setw() type function? It shouldn't be too much trouble. If they ever fix DBP's excessive memory usage error with string commands I wouldn't need it and I really don't want to wait for them to fix it (if it is ever fixed), but I will if its too much trouble for you guys. Please and thank you.

Great work so far!

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 06:32
it's already added to the vb dll, but Exeat is busy on something else first so we havent rewrapped it and released it yet. I am hoping to release version 1.1 within a day or two. A few posts up I explained what was added (4 more functions)

str_PadLeft() - is like setw()
str_PadRight() - is like setw()
fil_OutputFile()
tc_StrToFlt


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 7th May 2004 07:08
Cool ... My heros Sorry I only saw the str_PadLeft() and str_PadRight() names and not the discription. Its getting a bit late here I guess. Thank You.

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 7th May 2004 10:40
Sorry, been a little hectic this week. It's the weekend now though so I should get it all done.


"Computers are useless they can only give you answers."
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 7th May 2004 13:09 Edited at: 7th May 2004 13:38
If you can modify the equivilent of the setw that will fill in a number to a certain size and format, I'm sure people would find that useful.


The place for all great plug-ins.
The Coding Area - From my brain to your browser...
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 7th May 2004 14:50
yeah, I was already thinking about that one


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 8th May 2004 20:16
Another thing : Speech recognition - I was thinking of adding it to mine (but couldn't be bothered and no-one asked for it).


The place for all great plug-ins.
The Coding Area - From my brain to your browser...
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th May 2004 21:46
TCA,

post some output examples of what would be useful and I'll add the function to the dll. It'll probably be a mixture of a pad function with an insert function.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 8th May 2004 22:07
added the following function for v1.1

str_Insert(Str, StartIndex, InsChar) As String
Inserts the specified InsChar at the location of StartIndex within the supplied string (Str). The first character of the inserted character(s) becomes the specified index. The return string is the original string with the new character(s) inserted.

EXAMPLE:
str_Insert(“Hello�,2,�xxx�) yields Hexxxllo


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th May 2004 01:29
Well, it could be something like :

"xxxx.xx" which will force a (decimal) number to display up to 4 characters for the integer part and 2 for the decimal part - if there are fewer characters for either, the remaining space is padded with 'x' characters.

If you like, I can post the code for my pad routine (which unfortunately only details with integers).


The place for all great plug-ins.
Keep your friends close, and your cats even closer.
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th May 2004 02:37
no thanks on seeing the code I was jst wondering what you had in mind as the result. These will have to be strings if they are to have leading zeroes and truncated deciamls. I'll work on this after dinner or later tonight.

tentative name: str_FormatNum()




* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th May 2004 04:22
ok, added a number formatter function called tc_FormatNum() which does what TCA said above.

tc_FormatNum(Number, LDigits, RDigits)
returns a string representation of thje supplied number, formatted with leading zeroes, and trailing decimal places as specified in LDigits and RDigits.

tc_FormatN(123.12345,5,2) yields: 00123.12
tc_FormatN(123.12345,1,8) yields: 123.12345000

for v1.1 when released.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Dave J
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Secret Military Pub, Down Under
Posted: 9th May 2004 09:31
Actually I was going to suggest something similar but rather then something like that, just wrap the VB Format() or Format$() functions completely. So, the input would be like:

tc_Format(58964, "$#,###.00"
=$58,964.00

tc_Format(643.123, "0000.0"
=0643.1

You wouldn't even need to program any of that because VB's function does it for you, or at least VB6's one did, I presume VB.NET still has it, it's an incredibly useful function.


P.S. Have you been receiving my emails CR? I know my outgoing mail wasn't working last week but I was pretty sure it was working this weekend, it may have gone down again though.


"Computers are useless they can only give you answers."
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th May 2004 18:04
no I wasn't receiving any emails from you. Until this morning (sunday morning here). The format function should be included as well but the formatNumber function is cool too. I wrapped the .net formatnumber function and wrote some tweak code in with the wrap and seems to be working swimingly. My version presents the dbp user with a simple L-R digiits arg, instead of them having to know or care about formulating vb format strings.



* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 9th May 2004 18:10
That should make a few people happy...


The place for all great plug-ins.
Keep your friends close, and your cats even closer.
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 9th May 2004 19:00



* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
OSX Using Happy Dude
20
Years of Service
User Offline
Joined: 21st Aug 2003
Location: At home
Posted: 10th May 2004 01:10
Perhaps interfacing with MSN Messenger might be useful for someone...


The place for all great plug-ins.
Keep your friends close, and your cats even closer.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 10th May 2004 17:32
Would it be possible to alow DBP users to access the windows clipboard's data? DBP can only read and write strings to it now. I was trying to find a way to save sprites as they appear in game for screen shots. DBP won't capture them but print screen does. I was wanting to try to use the clipboard data to make the image.

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 10th May 2004 17:37
I could access the clipboard data from the dll no problem, regardless of the data type, but how then would it get returned back into dbp calling code? What data type in dbp could call a function that returns clipboard image data?


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 10th May 2004 18:01
I don't know right off as i'm still learning DBP but I was thinking somewhere along the lines of memblocks. There is already a make image from memblock command in DBP. So I was thinking it might be possible but I don't know.

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 10th May 2004 18:01
I will look into this.


* DBP_NETLIB_v1 - VB.NET PLUGIN FOR DBP * Click Logo
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 10th May 2004 22:25
Thank you very much. You may could even save the clipboard to a temp file and access the file to a memblock and delete the file. But I don't know. This is all guessing. DBP can call an external exe using system commands. I might be able to write my own screenshot program in C++ turning the clipboard into a image file (preferrably .bmp) and incrementing the filenames as it creates them. Then call the program from DBP but a plugin would be better I think. I appreciate all that you guys are doing.

"People don't fail ..... they stop trying." Specs. P4 2.8GHz 800 FSB | 512MB DDR333
GeForce FX 5200 AGP 256MB | Windows XP Pro Full
walaber
20
Years of Service
User Offline
Joined: 22nd Oct 2003
Location: Los Angeles, CA
Posted: 11th May 2004 06:35
if you use IanM's C++ interface, you could call DBPro commands from within the DLL to create a memblock, and fill it with the data.

on the other hand, you could require the user to create a memblock, and pass the pointer to it to the function.

from what I understand, CattleRustler, you're using VB? if so, the sceond option might be the easiest/best

Go Go Gadget DBPRO!

Athlon XP 2400+ || DDR-SDRAM 1GB || Nvidia GeForce 4 Ti4200 AGP 8x 128MB
CattleRustler
Retired Moderator
20
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 15th May 2004 17:23
sorry to bump this thread up but just wanted to let you all know that version 1.1 was released. There is a new thread in this same forum so this one can die.

maybe a mod could sticky the other thread so I don't need to make new ones when new features are added to the plugin?

thanks


* DBP_NETLIB_v1.1 - VB.NET PLUGIN FOR DBP * Click Logo

Login to post a reply

Server time is: 2024-05-07 14:42:04
Your offset time is: 2024-05-07 14:42:04