View Full Version : Need advice on new plug-in
Ron
October 13th, 2002, 03:55 PM
You cannot. Plugins do not have access to the data tree.
<font size=-1>[ This Message was edited by: RonB on 2002-02-28 22:34 ]</font>
Ron
October 13th, 2002, 03:55 PM
For what reason do you need access to the data tree?
Ron
October 13th, 2002, 03:55 PM
I've seen the homepage yes.
If you want to trigger a command in Girder why don't you do that like every other 'hardware' plugin, send an eventstring. Let the user decide what to couple to that event. That is the way Girder works.
<font size=-1>[ This Message was edited by: RonB on 2002-03-01 09:06 ]</font>
Ron
October 13th, 2002, 03:55 PM
such an array would be useless since MCP would have no clue as to what these IDs represent.
Ron
October 13th, 2002, 03:55 PM
No you could execute a command that the user previously defined. Thus you would have no way of knowing beforehand what that action actually does. So please work the other way around and send an event to Girder, that is the way that Girder was designed to work, i'm not going to change this. That would be crazy.
<font size=-1>[ This Message was edited by: RonB on 2002-03-01 22:27 ]</font>
Ron
October 13th, 2002, 03:55 PM
The API is in plain C, but take your time, Girder will still be here.
Robin
October 13th, 2002, 03:55 PM
Hey .. can't I already do all the things that MCP does with Girder anyway ?!
From the look of the screenshots, MCP has a list of groups, containing individual commands (I didn't see any multi-groups though).
Admittedly it looks like putting floating palettes of buttons on the screen could be useful, but can't I do the same thing with a few borderless web-pages and the TCP plugin for Girder ?
Anyway ... if you want to run an HTPC (as I do) then you REALLY don't want anything cluttering up the display when your DVD is playing ... Although the trackball is an easy to use device (I use a cordless wheel mouse for more complex tasks) I have to say that a remote control coupled with the UIRT is absolutely unbeatable, provided I remember what I set each button to do !
I will admit I haven't attempted to download MCP and really try it out ... as I couldn't really see any advantage over carefully constructed application groups within Girder.
ChrisG
October 13th, 2002, 03:55 PM
I have just introduces a new HTPC user interface program (http:\216.194.83.89). I would like to write a plug-in to connect it to Girder.
The plug-in needs to retrieve a list of Girder's commands and multicommands, then be able to invoke any of those commands.
I understand I can invoke a Girder command using this:
SendMessage(SupportFunctions.targetHWND, WM_USER+1024,0, PassID);
But how can I retrieve a list of Girder's commands and their IDs?
ChrisG
October 13th, 2002, 03:55 PM
That's a shame. I'd very much like to connect to Girder, it's a powerful program. What would it take to expose a list of commands? I'd be willing to help with it in any way I can.
ChrisG
October 13th, 2002, 03:55 PM
I want my program (called MCP) to plug into Girder so users can trigger Girder commands from within MCP.
If you have not heard of MCP, there is a link to it in my signature. Basically it allows users to organize and place buttons on the screen. Each button triggers a command in a plugged in program.
If I can access Girder's data tree, I can provide the user with a button for each Girder command and multicommand they have set up on their system. Check it out, it's pretty cool.
I don't think MCP takes away from Girder any because MCP doesn't have any of the tools Girder does to control system messages, get window handles, etc. As far as I know, Girder is the only program for doing that. Basically, UI is MCP's only job. If anything, having a plugin between Girder and MCP would bring more users to Girder as they'd get introduced to it from my web site.
If you have the command and multicommand IDs stored in a tree type control, maybe you could just loop through the nodes and build an array of the IDs. The plugin could call a function to get the array, and then attach each ID to a button within MCP. When the button was clicked, MCP would use SendMessage to send the command ID to Girder, and Girder would trigger that command.
ChrisG
October 13th, 2002, 03:55 PM
That's an interesting suggestion...
If I understand Girder correctly, that would require each button in MCP send a unique eventstring.
MCP determines what commands its plugins provide when it loads up. I suppose I could arbitrarily provide 10 or 11 buttons, and assign a unique eventstring to each one, but it wouldn't be pretty.
If I had an array of command IDs, the Girder commands available in MCP would change as the user added and removed them in Girder.
ChrisG
October 13th, 2002, 03:55 PM
RonB,
Maybe the ID your talking about is not what I had in mind.
The Girder API says that you can execute a command from the command tree by using SendMessage in this form:
SendMessage(SupportFunctions.targetHWND, WM_USER+1024,0, PassID);
So with a PassID for each command, I could execute any Girder command with SendMessage right?
ChrisG
October 13th, 2002, 03:55 PM
Darnit, I don't know what I'm going to do.
It looks like the hardware plugins require coding in C++. I don't know how.
I don't really understand the Girder API. (Probably because I don't know C++). Trying to figure the API out on my own would take more time than I can spend right now. I guess I'll just have to put the Girder plugin on hold. Maybe in the future someone will be able to figure out how to do one.
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.