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.

DLL Talk / Script Engine

Author
Message
DavidOC
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location: México
Posted: 5th May 2005 13:39 Edited at: 5th May 2005 13:41
I'm writing a plugin to run scripts in DBpro, at the moment the dll allows you to run a statement or a script file with a "main" function, you may select the script language (VBScript, JScript or other if installed). The dll provides a DBpro object to call DBpro commands, at the moment only the LOAD OBJECT command is implemented:


The attached file contains: the dll, a script sample and a DBO.
Of course you need extra components to run the plugin:
a) VB6 runtimes
b) MS Script Control
c) MS Windows Script

I'm having troubles implementing some DBpro commands, I tried calling MAKE OBJECT BOX command, the object number is passed correctly but the width, height and depth can't be set. If anyone has information about this issue I'll appreciate your collaboration.

Regards

Ce Acatl Xochitzin

Attachments

Login to view attachments
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 8th May 2005 01:23
i would reccommend u put in stringtables
just to get peoples attention cause hardly anyone likes the call dll(except for maybe me and i dont mind it) and most of the time will not even look at your dll if it dont have stringtables!

X-Patch x-patch.exe(gui):75% make.exe:5% x-patch.dll(runtime dll):0% developed on win xp home sp2
DavidOC
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location: México
Posted: 8th May 2005 11:20
Thanks for your comment. I didn't add string tables because I wanted to solve the function call problem (now it's solved). Next release will be posted in Program Announcements with all DBpro commands (at the moment Animation, 2D and some 3D commands are implemented). It will include string tables and a script console.

Regards

Ce Acatl Xochitzin
Three Score
20
Years of Service
User Offline
Joined: 18th Jun 2004
Location: behind you
Posted: 8th May 2005 11:47
DavidOC
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location: México
Posted: 11th May 2005 13:58
Well, I couldn't resist to post another version, this is the list of implemented features:

Script console (basic)
2D functions
3D functions
Animation functions
Bitmap functions
Camera functions
Core functions (see below)

At the moment I don't know how to implement the array/queue functions because they get an array as parameter and I doubt a VBArray will make the trick, so probably these won't be implemented (I have to make some tests). Also the make/fill/copy/delete memory functions are not implemented, these are more likely to be implemented but tests are required.

String tables were added, so you may copy the dll to your plugin-user folder and copy the INI file to the editor/keywords folder to have
syntax color in your editor. There is an issue with this: you can't call the commands directly in your main file, you need to add a new file to your project and paste this code:


And this is a sample code you may use in your main file:


Ce Acatl Xochitzin

Attachments

Login to view attachments
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 12th May 2005 19:28
would be more useful if we could run C# and or DBP Script
(i'm not a fan of the current scripting languages you've included)
DavidOC
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location: México
Posted: 14th May 2005 12:06
Short answer: It MAY be possible to run C# scripts with this plugin, but I don't know a public implementation.

Long answer: I'm wrapping the DBPro functions with VB Classes and passing instances of this objects to MS Script Control. You define the script language, load a script and call functions/commands. Now, what languages can you set? Any "ActiveScript" language installed in your machine(VBScript, JScript, PerlScript, PythonScript, LuaScript, RubyScript, ForthScript, etc.) These script languages are stored in COM objects that implement the IActiveScript interface, at the moment I don't know a public implementation of C#, but it may be possible to do such implementation, there are some examples about how to load and run C# files on the fly:
http://weblogs.asp.net/cumpsd/articles/80785.aspx
http://www.members.optusnet.com.au/~olegshilo/

Ce Acatl Xochitzin
Raven
19
Years of Service
User Offline
Joined: 23rd Mar 2005
Location: Hertfordshire, England
Posted: 15th May 2005 05:27
Oh I know how to load and run C# on the fly..
.NET and DirectX both have individual implimentations and security measures to allow it safely.

But.. I'm feeling particularly lazy in this respect to wrap the function. ^_^
DavidOC
20
Years of Service
User Offline
Joined: 1st Jul 2004
Location: México
Posted: 25th May 2005 09:22
Well, I'm not working anymore on this dll, I completed all the DBpro commands (except the array and math ones) and even started a code editor capable to interact with the DBpro application, but it really doesn't add any value to my current game project. It's not wasted time because I'll reuse this code to write various modules for my game.

Regards

Ce Acatl Xochitzin

Login to post a reply

Server time is: 2024-11-21 13:59:34
Your offset time is: 2024-11-21 13:59:34