Connexion rapide:  

Forum: VirtualDJ Plugins

Sujet GetInfo()

Ce topic est ancien et peut contenir des informations obselètes ou incorrectes.

I'm writing a new mapper and I would like some help.
I'm trying to see if there are any new feeds at the GetInfo command.
Can anyone tell me where I can find documentation for it?
I mean I found on this forums the full list of commands VDJ 5.2 accepts, but I could not find a full list with the info GetInfo provides back.
Also on the post that's sticky on top of this forum it says that I should search the forums.
I did so but I got too many results with a "try to refine your search" comment while the topic I was looking for wasn't there.

Finally I know I can "call" GetInfo(Help) to get the full list, but (since my c++ knowledge is limited) I don't know how.

What would be best is to call this and get a text file with all the commands.
Can anyone help me out on this?

PS: I'm using PCDJ VJ and not VirtualDj.
 

Posté Thu 18 Sep 08 @ 4:35 am
SBDJPRO Infinity Member since 2006
I'm not sure if this info is restricted, since there is a post, but only viewable by limited level users. The help call you mentioned is dead easy, I'll send you a PM.

Regards,

Scott
 

Posté Fri 19 Sep 08 @ 7:37 am
djcelPRO InfinityModeratorMember since 2004
PhantomDeejay wrote :
Finally I know I can "call" GetInfo(Help) to get the full list, but (since my c++ knowledge is limited) I don't know how.

What would be best is to call this and get a text file with all the commands.
Can anyone help me out on this?

I made a special plugin (dll) for GetInfo().
It's included in the plugin Wizard if I remember well.
 

Posté Fri 19 Sep 08 @ 7:08 pm

I made a special plugin (dll) for GetInfo().
It's included in the plugin Wizard if I remember well.
Yes, but I can't find the wizard anywhere... Plus I don't think I have the "privilege" to download it. (I can't download anything from the downloads section besides the SDK)
 

Posté Sat 20 Sep 08 @ 9:45 am
SBDJPRO Infinity Member since 2006
Did you read the message I sent you about how to call GetInfo help and display the output?
 

Posté Sat 20 Sep 08 @ 11:18 am
Did you read the message I sent you about how to call GetInfo help and display the output?
No... It's funny, but I can't find any messaging system on the board... Thus I don't know if there's a PM ability...
Unless I don't know where to look....

 

Posté Sun 21 Sep 08 @ 6:27 pm
Tear Em 'UpPRO InfinitySenior ModeratorMember since 2006
I believe PMs are for licensed users only...
 

Posté Sun 21 Sep 08 @ 6:44 pm
SBDJPRO Infinity Member since 2006
Ah, whoops, it let me send it!

Well it's dead easy;

char *Result;
GetInfo("help", &Result);
OutputDebugString(Result);


Regards,

Scott
 

Posté Sun 21 Sep 08 @ 7:43 pm
Thanks Scot. It worked like a charm.

Now I have another dump question:

I want to declare some string parameters. What I want to do is to have a textbox on the options where the user can type in something.

I use the declare parameter the normal way I use it to declare switches, but I don't get a textbox. Plus on the auto .ini file I get an empty entry.
If I type something in, the entry still gets cleared when my plug-in loads.

Here are the parts of the code that might interest you:

char *Str_Param1;

HRESULT VDJ_API PhantomDj::OnGetPluginInfo(TVdjPluginInfo *infos)
{
infos->PluginName="DENON DN HC4500 Advanced Mapper";
infos->Author="PhantomDj";
infos->Description="Advanced Mapper v 2.00.00 Alpha";
infos->Bitmap=LoadBitmap(hInstance,MAKEINTRESOURCE(1000));
infos->Flag=0;
return S_OK;
}

//////////////////
HRESULT VDJ_API PhantomDj::OnLoad()
{
DeclareParameter(&VDJMode,VDJPARAM_SWITCH,1,"VDJ Mode",OFF);
DeclareParameter(&ShowRemainTime,VDJPARAM_SWITCH,2,"Show Remain Time",ON);
DeclareParameter(&ShowBPM,VDJPARAM_SWITCH,3,"Show BPM",ON);
DeclareParameter(&BlinkTapOnBeat,VDJPARAM_SWITCH,4,"Blink TAP Button On Beat",OFF);
DeclareParameter(&UsePitchAsFaders,VDJPARAM_SWITCH,5,"Pitch Sliders as Crossfaders",OFF);
DeclareParameter(&Str_Param1,VDJPARAM_STRING,6,"Test String",sizeof(*Str_Param1));
return S_OK;
}

////////////////////

INI File:

[AutoParams]
Switch VDJ Mode 1=1
Switch Show Remain Time 2=1
Switch Show BPM 3=1
Switch Blink TAP Button On Beat 4=0
Switch Pitch Sliders as Crossfaders 5=0
String Test String 6=

//////////////////////

I have also tried to declare the test string as following:

char Str_Param1[512];

with the same results...


Can anyone help me on this?

Also, the next step will be to change the Str_Param from within the plug-in. I believe that assigning a value will also update the string value in the .ini right?

Anyway, if creating a textbox is not easy, then I still would like to be able to use string parameters that save between sessions.
For instance a string parameter would hold the last effect name used e.t.c.
I would like to do it with "auto generated" ways like the switches.

Please remember that my c/c++ knowledge is limited! I'm mostly a VB guy ;)
 

Posté Mon 22 Sep 08 @ 3:30 am
SBDJPRO Infinity Member since 2006
Unfortunately creating a textbox is less than simple. The VDJPARAM_STRING is for displaying a string - it will display what is in Str1_Param whenever the effect panel is redrawn.

Being a vb man, one option could be to implement a class with an InputBox() style dialog that pops up for input when you click a VDJ interface button, say something like this:

http://www.codeproject.com/KB/dialog/w32inputbox_1.aspx

The only real way I know of though to have user input in string format would be what I've done with my ScrollText plugin - to create a dialog, and pass VDJ the handle to that as the GUI interface, rather than it's own interface. You'll need to create the dialog, then pass the handle to that dialog back to VDJ in OnGetUserInterface. You will also need to set up a message handler, and process all messages manually for your GUI.

Regards,

Scott
 

Posté Mon 22 Sep 08 @ 7:19 am
SBDJPRO Infinity Member since 2006
Oh, and using VDJPARAM_STRING:

char String1[128];

HRESULT __stdcall CTestPlugin::OnLoad()
{
DeclareParameter(String1,VDJPARAM_STRING,2,"My String",sizeof(String1));
OnParameter(0);
return S_OK;
}

HRESULT __stdcall CTestPlugin::OnParameter(int id)
{
SendCommand("effect_redraw",0)
return S_OK;
}


Whenever you update String1, call OnParameter(0) and it will redraw the GUI and update the string displayed accordingly.

If you do decide to go down the custom GUI route, I can probably knock up an example project in VS 2008 and send it over to you.
 

Posté Mon 22 Sep 08 @ 7:24 am
Thanks Scott. I understand it now...
If it's possible can you post a small sample code to read/write parameters on a custom .ini file?
I believe it's the most simple approach I can use...

If you can help me on this I would like an example that reads/writes 3-4 parameters

I believe I can handle the rest.

Thank you very much for your help and support!
 

Posté Tue 23 Sep 08 @ 2:20 am


(Les anciens sujets et forums sont automatiquement fermés)