in reply to Hrm
in thread using the send_im function in Net::OSCAR in Tk outside of a Net::OSCAR callback
I don't know if you need threads at all (being unfamiliar with Net::Oscar.) You may be able to do it with some other easier method, like in your
The above is just an idea, since you are using a while(1) loop, which will interfere with Tk's mainloop. You can call DoOneEvent to keep Tk going and responding to events.while(1) { $oscar->do_one_loop(); # Do stuff #update your Tk widgets here $mw->DoOneEvent( DONT_WAIT | ALL_EVENTS ); }
All in all, you are asking for us to give you a simple code example, for a fairly complex program..... not gonna happen. I did see there is a POE component module for Net::Oscar, maybe you would want to look at that?
As far as simple sending of a message goes, there is an "oscartest" script contained in the module distribution, I would start with that. Sorry, I don't have AIM going so I'm not able to try it. Maybe post a another topnode question.... "How do I use Net::Oscar"? Or Net::OSCAR: Having trouble getting started
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Success!
by fridayjones85 (Novice) on Jun 27, 2006 at 18:44 UTC | |
by zentara (Cardinal) on Jun 28, 2006 at 11:15 UTC |