|
Post by mikehense on May 7, 2015 13:03:37 GMT
a few questions, please...
1 - would those devs who use scripting like the idea of a dll that extended the scripting commands to include stuff like showing/hiding the mouse cursor, using system dialog boxes for notifications, and possibly a new FileOpen/Save dialog box...
2 - these new commands would work only in windowed and windowed full screen modes... not in full screen... would that be objectionable...
3 - what other new commands would you like to see...
thx for your input
--Mike
|
|
|
Post by F1Andre on May 7, 2015 15:08:06 GMT
Mike this is great idea, I have no knowledge on how to program extensive commands. 3D RAD needs more functions to provide more usability. At first everything is a small command or function, but it becomes so much more. I would say do it if you have the time. It will become usefull.
|
|
|
Post by Power Supersport on May 7, 2015 16:52:22 GMT
I really want to learn how to program .dll-s, because 3D Rad needs more functions... since it's abandoned...
It's great that it has a iDLLCall() function...
|
|
|
Post by mikehense on May 8, 2015 12:38:16 GMT
i am currently coding the dll in c++... but you can use any language that is capable of compiling a dll... i've made DLLs in Delphi (no additional runtimes required), and i'm sure that VB and VC# are capable of compiling dlls (dot net runtimes required)... other languages are also probably able to do this as well...
on the 3DRAD side, the interface to the DLL is pretty straight forward... look at the .iDLLCall.3dr project for all you need...
the DLLArray is used to pass values (float) back and forth between 3DRAD and the DLL...
i discovered that you can also pass strings back and forth easily because strings are treated as arrays as well (an array of characters)... simply loop around and assign the DLLArray elements to the value of the respective string elements...
--Mike
|
|
|
Post by mikehense on May 8, 2015 20:19:18 GMT
ok... here's the first 3DRAD Command Extensions DLL and an example project... please test it out and report any funny stuff and suggestions... 1 - get both the dll and the .3dr files... 2 - place the dll in your \3d rad\3drad_res\objects\scripts folder and rename it from 3DRADExtenderDLL.3dr to 3DRADExtender.DLL (i had to name it this way in order to attach it - sorry) 3 - place the .3dr file in your \3d rad\3drad_res\projects folder 4 - open up the 3drad editor, load the project and run... the new callable functions are: ShowMsgBoxOK() ShowMsgBoxInform() ShowMsgBoxWarn() ShowMsgBoxYesNo() ShowMsgBoxYesNoCancel() ShowMsgBoxRetryCancel() HideMouseCursor() ShowMouseCursor() the text to be displayed in the message boxes are passed via the iDLLArraySet() function, and the new functions are called via the iDLLCall() function... the .3dr file shows how to do it, and there are examples of c++ dll code as well... --Mike
|
|
|
Post by NicusorN5 on May 9, 2015 7:22:05 GMT
Cool!Gotta add them in 3D Rad v 6.52
|
|
|
Post by Power Supersport on May 9, 2015 10:42:38 GMT
Why it doesn't work for me?
|
|
|
Post by mikehense on May 9, 2015 13:29:47 GMT
what exactly is happening Power?? or isn't happening...
also, what version of 3DRAD and Windows are you using? this was tested on Win 8.1 and Win Vista...
Nicursor... great idea... these are free for the community to use... please lemme know if it works...
also...
i neglected to add a demonstration for the Hide/ShowMouseCursor function...
just add the small code below (copy/paste) to the script and press 7 and 8 to hide/show the mouse pointer... this was always something that was a hit and miss with Rad developers, so i decided to throw it in... now you have control over the visibility of the mouse pointer...
just be sure to restore it before the program ends...
// HIDE MOUSE example was selected if (DLLHandle != 0 && isDone==false && iKeyDown(iKeyCode("DIK_7"))){ // call the user-defined function in the test DLL module iDLLCall(DLLHandle,"HideMouseCursor",0); }
// SHOW MOUSE example was selected if (DLLHandle != 0 && isDone==false && iKeyDown(iKeyCode("DIK_8"))){ // call the user-defined function in the test DLL module iDLLCall(DLLHandle,"ShowMouseCursor",0); }
--Mike
|
|
|
Post by Power Supersport on May 9, 2015 14:32:14 GMT
I am on Win 7, renamed the 3DRADExtenderDll.3dr to 3DRADExtender.Dll (tried with uppercase and lowercase extension). Then I ran the project... started it, but after I press the keys, nothing happens...
|
|
|
Post by mikehense on May 9, 2015 18:05:08 GMT
is the dll in the script folder?
should be in the 3d rad_res\objects\scripts folder
--Mike
|
|
|
Post by Power Supersport on May 9, 2015 18:39:01 GMT
Of course it is...
|
|
|
Post by mikehense on May 9, 2015 23:28:30 GMT
i had to ask... you'd be surprised at how often simple overlooked things cause problems that should work but don't...
ok... does the iDLLCall demo project that comes with 3drad work?
--Mike
|
|
|
Post by Power Supersport on May 10, 2015 5:29:05 GMT
Yes... fully working...
|
|
|
Post by mikehense on May 10, 2015 7:37:20 GMT
has anyone else tested the 3DRADExtender dll... if so, is anyone encounter the same issues as PS...
|
|
|
Post by n_iron on May 11, 2015 5:43:31 GMT
Hi Mike I am not at home so I can't help you n_iron
|
|
|
Post by NicusorN5 on May 26, 2015 19:07:46 GMT
I got the same bug like power...
|
|
|
Post by TinSoldier on Jan 10, 2016 2:56:20 GMT
I tried it out, works perfect, i mite even use it in a project or two..
PS if you didn't figure it out the ***DLL.3dr project needs to be right clicked on and saved as ***.dll in your script folder.
I assume the forum didn't or wouldn't allow a .dll to be attached so mike fooled the forum by renaming the file with a .3dr extension.
|
|