Sample send IM script?
darugar at gmail.com
Mon Jul 2 22:07:45 EDT 2007
The account is signed in; I can setup an event loop and receive events
on it. I forgot to mention - on the nullclient side I get:
** (process:28764): CRITICAL **: purple_conversation_new: assertion
`gc != NULL' failed
I'll look at goim command, that seems like a very good lead.
On 7/2/07, Etan Reisner <pidgin at unreliablesource.net> wrote:
> On Mon, Jul 02, 2007 at 04:51:54PM -0700, Parand Darugar wrote:
> > Hello,
> > I start nullclient and I'm able to interact with it using D-Bus.
> > Here's what I'm trying:
> > import dbus, dbus.glib, dbus.decorators, gobject
> > bus = dbus.SessionBus()
> > obj = bus.get_object("im.pidgin.purple.PurpleService",
> > "/im/pidgin/purple/PurpleObject")
> > purple = dbus.Interface(obj, "im.pidgin.purple.PurpleInterface")
> > name = 'someaccount'
> > protocol = 'prpl-yahoo'
> > ac = purple.PurpleAccountsFind(name, protocol) # returns a non-zero value
> > conversation = purple.PurpleConversationNew(1, ac, name) #
> > conversation returns 0
> > im = purple.PurpleConversationGetImData(conversation) # im is also 0
> > purple.PurpleConvImSend(im, "hello there")
> > Do I need some sort of connection or something after I find the
> > account to make this go?
> > Much thanks,
> > Parand
> Have you set up that account in the nullclient? Is it signed on when you
> try this script?
> If the account isn't online you are going to need to connect it before you
> can create a conversation. For reference you can look at what the
> purple-remote script does for the goim command.
More information about the Devel