Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import messaging
- import appuifw,e32
- def quit():
- print "Thank you for using this service"
- def send_error():
- appuifw.note(u"Sending cancelled!!","error")
- def enter_phno():
- ph=appuifw.query(u"Enter no.","text")
- return ph
- def enter_no():
- n=appuifw.query(u"How many times do you want to send?","number")
- return n
- def enter_body():
- body=appuifw.query(u"Enter the body of sms :","text",u"u r doomed...")
- return body
- def check(n,ph):
- q=appuifw.query(u"Send "+str(n)+" sms to "+str(ph)+"?","query")
- return q
- def send(n,ph,body):
- for i in range(n):
- messaging.sms_send(ph,str(body))
- appuifw.note(u"Sms sent!!","conf")
- print "Sms sent!!"
- appuifw.app.exit_key_handler = quit
- appuifw.app.title = u'SMS'
- ph=enter_phno()
- if ph:
- n=enter_no()
- if n:
- body=enter_body()
- if body:
- q=check(n,ph)
- if q:
- send(n,ph,body)
- else:
- send_error()
- quit()
- else:
- send_error()
- quit()
- else:
- send_error()
- quit()
- else:
- send_error()
- quit()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement