help with plugin

Xlobby plugin development

help with plugin

Postby lar282 on Sat Mar 26, 2005 10:43 pm

Hi
Is any willing to help me out...

I got the basics of my first plugin and all commands are set up.that workds, but I cant figure out how to access xlobby info.
So can anybody show me how to simply make a dialog box popup with current EPG channel info?If I figure out how to access that I can fix the rest.
Second problem I'm having is sendcommand through a plugin.Trying to just open calc.exe but how do I set that up? It just wont like my commands
case "RecordNow":
SendCommand("command:os:execute file:calc.exe:::");
break;

if I set the full path to calc.exe it wont compile!

I tried to read http://www.xlobby.com/Documentation/PluginInterface but I just cant get it.

pretty please help me out.

public void Execute(string command)
{

IntPtr pInUse = (IntPtr)0;
switch( command )
{
case "xmainmenu":

SendCommand("command:xlobby:goto screen:menu");
break;



case "epgtest":
//sDisplayInfo1= XPluginSDK.Program GetCurrentProgram ( );
// public abstract new XPluginSDK.Program GetCurrentProgram ( )
MessageBox.Show(sDisplayInfo4);
SetDisplayInfo( "EPG test: " , null, 4000 );
break;


}
}


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby badubo on Sun Mar 27, 2005 12:37 am

if I set the full path to calc.exe it wont compile!

you have to either use \\ instead of \ in the path, either put @ before the string @"your full path"

For the sendcommand, don't forget that you cannot have a drive in the path (c:) otherwize it will be parsed as a parameter. You must use the ArrayList version of sendcommand
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby lar282 on Sun Mar 27, 2005 7:33 am

badubo wrote:
if I set the full path to calc.exe it wont compile!

you have to either use \\ instead of \ in the path, either put @ before the string @"your full path"

For the sendcommand, don't forget that you cannot have a drive in the path (c:) otherwize it will be parsed as a parameter. You must use the ArrayList version of sendcommand


Thanks for the tips about the sendcommand.
Badubo, easn't it u that wrote the tv plugin? if so any chance that I can look at the source to learn a few things?


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby badubo on Sun Mar 27, 2005 4:29 pm

Are you writing also a tv plugin (for PVR I guess)? Does it mean that Carm leaves the project?

The TV-Plugin I write allows to add any card (throught internal plugins). May be is it better if you make an internal component instead of a brand new plugin

Concerning the sources, I will probably make them public once all features are finished but not before. Also, this plugin is absolutly not a "how to" plugin. It's structure is quite complex for beginning with xlobby plugins.
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby lar282 on Sun Mar 27, 2005 5:47 pm

badubo wrote:Are you writing also a tv plugin (for PVR I guess)? Does it mean that Carm leaves the project?

The TV-Plugin I write allows to add any card (throught internal plugins). May be is it better if you make an internal component instead of a brand new plugin

Concerning the sources, I will probably make them public once all features are finished but not before. Also, this plugin is absolutly not a "how to" plugin. It's structure is quite complex for beginning with xlobby plugins.

Havent heard anything from Carm...

No I'm not writing a pvr plugin, just a schedule and record plugin. Only for pvr250 and 350 cards.

I realize your plugin is way to complex for me but maybe I will pick somthing up how to access the xlobby info(wich I cant right now). If u want and are willing mail me the source and I will NOT make it public or send it to anybody. Only for me to learn.


Thanks in advance


LAsse
mailto:lasse10@telia.com
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby badubo on Sun Mar 27, 2005 6:27 pm

Ok, I will prepare a package and send it tonight

Just one thing : you are trying to start an application by sendcommand. it is really better to use the Process class in c#, you don't need to use xlobby events for that.

My idea about a first plugin ifor PVR was to use gottv (we can still find it in some site). It has the advantage to be compatible with hardware and software based cards, better for my tests
Did you already use it?
badubo
 
Posts: 505
Joined: Mon May 03, 2004 7:33 pm
Location: Belgium

Postby lar282 on Sun Mar 27, 2005 6:37 pm

Well the fact is that the "plugin" is already done! BUT its a script. Dont get me wróng it works perfect now, but to make it more flexible and user friendly for other people than me I though I would incorporate it all with a plugin. But for that I need epg info in the plugin wich I now get from a variable. I will use the proccess instead of sendcommand. Just looked into it.
I really got all the plugin details done but like I said I need the info from xlobby to finish it up. All the commands and logic is done so when I figure the epg info out it will take me 40 minutes to wrap it up.
I dont really know why I do this when the non plgin version works but I guess improvments are in the blood and its fun creating stuff. Sometime its more fun figure thing out than actually using the things.. he he

REALLY looking forward to the package. ZIP it and set a password on the zip so the mailserver doesn't delete it. Its so sensitive to spam..


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden

Postby lar282 on Sun Mar 27, 2005 9:44 pm

Man I feel dumb. I had the OLD OLD XPluginSDK.dll and thats why I could not get it to work.


//Lasse
lar282
 
Posts: 1624
Joined: Thu Apr 01, 2004 4:13 pm
Location: Helsingborg, Sweden