views:

129

answers:

3

Hello,

Is there a practical way to set the global status message in Pidgin for Windows from .NET?

Dbus is not available in the Windows version of Pidgin.

Searching SO and the net has revealed helpful tips such as "rewrite libpurple in C#", which might be a bit beyond my time/enthusiasm level for this project at least...

Thanks

+2  A: 

how about writing a plugin, and have it expose a way for your other program to pass the status to it. Could be a file that you write the status to, or maybe a local tcp port (if you can do that in plugins).

eglasius
That's not a bad idea, although I'm not sure it's much less work than "write your own .NET wrapper"
Colin Pickard
@Colin imho its a safer bet, that said I would expect the wrapper path to work well in your particular scenario / its a simple call for a simple action.
eglasius
Thanks eglasius. I think this is best way of doing what I want, so I've give you the bounty. I'm not sure I will have time to implement it soon though :(
Colin Pickard
A: 

Solved here http://stackoverflow.com/questions/1532887/using-libpurple-from-net

Tomas Voracek
The answer you link to is "write your own .NET wrapper". I wouldn't say it was solved - more that an explanation was offered as to why no-one has done this.
Colin Pickard
+1  A: 

Have you considered simply simulating keyboard input to the Pidgin window using C#?

You will need to find the Pidgin window programmatically and then set your status by sending simulated keyboard input to that window handle.

A good Microsoft example of how it was done with Calculator:

http://msdn.microsoft.com/en-us/library/ms171548.aspx

As I recall, Pidgin will set your status if you simply put the main window (buddy list) in focus, start typing, and then press Enter. Simulating this keyboard input should be quite straightforward.

A dirty solution (that future versions of Pidgin might break), yes, but certainly MUCH easier than writing a plug-in or making your own libpurple wrapper.

userx