Re: [PyQt] Sending Instant Message on N900 through PyQt (using PySide QtMobility)
On Tue Oct 5 04:27:05 BST 2010, praveen koduru wrote: I want to send IM(Instant Message) from GTalk of N900 using PyQt. I have found sending sms PyQt script here http://wiki.maemo.org/Phone_control#Send_SMS. and tried to modify for Instant Messaging. But I am getting send failed error. I am new to PyQt. I have logged in to gtalk before running the script then started the script. the following is the code I have modified. Looking at the code you posted, it seems that PyQt is only used to process strings, and that the rest is done using PySide and the PySide Mobility bindings. Two suggestions come to mind: 1. Have you considered using the PyQtMobility package with PyQt? http://www.riverbankcomputing.com/software/pyqtmobility/intro 2. Whatever you're using, you probably need to start the event loop for the SMS to be sent. You should call app.exec_() to do this. David ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[PyQt] Sending Instant Message on N900 through PyQt (using PySide QtMobility)
Hi, I want to send IM(Instant Message) from GTalk of N900 using PyQt. I have found sending sms PyQt script here http://wiki.maemo.org/Phone_control#Send_SMS. and tried to modify for Instant Messaging. But I am getting send failed error. I am new to PyQt. I have logged in to gtalk before running the script then started the script. the following is the code I have modified. app = QCoreApplication(sys.argv) '*''get number and name'''* stringit = sys.argv numpertemp = str(stringit[1:2]) mesits = str(stringit[2:])[2:-2] num = str(numpertemp[2:-2]) if (mesits == ): print Usage: print python ssms.py 01234567 'message text here' sys.exit(69) else: print number is + str(num) print message is + str(mesits) '*''define message to be sent'''* numperi = QtCore.QString(num) numper = QMessageAddress(QMessageAddress.InstantMessage, u...@gmail.com) mesitsi = QMessage() mesitsi.setType(QMessage.InstantMessage) mesitsi.setTo(numper) mesitsi.setBody(mesits) '*''send message'''* sender = QMessageService() if (sender.send(mesitsi)): print success else: print fail where as modifying writemessage example of QtMobility(C++) I am able to send IM by making the above changes only. but not with PyQt. I need with PyQt. any help would be greatly appreciated -Praveen. ___ PyQt mailing listPyQt@riverbankcomputing.com http://www.riverbankcomputing.com/mailman/listinfo/pyqt