0

i have a problem... i am new to python... and i have found a program that reads an sms directly from the phone's inbox... i am using nokia 6600... i just want to ask how will i be able to copy the sms file to a string? here is the code i saw in the net:

import appuifw,e32
import inbox
flag=0

def exit_key_handler():
app_lock.signal()

def read():
appuifw.app.title=u"Encoded Message"
box=inbox.Inbox()
id=box.sms_messages()
msg=box.content(id[0]) # <-- how will i be able to copy this sms file to a string

round.set(msg)

app_lock = e32.Ao_lock()
round = appuifw.Text()
decodedmsg=[]
appuifw.app.body = round

appuifw.app.menu = [(u"Read message", read)]

appuifw.app.title=u"Message Retriever"

appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()


* hope someone will help me with this...

2
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by leviaeon
0

Use code tag.

msg=box.content(id[0]) # <-- how will i be able to copy this sms file to a string 
print type(msg)  #Show what datatype msg is
print msg        #Try to print the message

Post the outcome of this

0

@snippsat

NameError: name 'msg' is not defined... dont get it.. msg mas defined already... hmmm

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.