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.
_______________________________________________ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers