Advertisement
here2share

# SMS_Demo.py

Jun 22nd, 2015
433
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # SMS_Demo.py
  2.  
  3. import messaging, appuifw
  4. help(messaging)
  5.  
  6. print 'SMS Demo'
  7.  
  8. ddd=1235551234 # <<< Note: pseudo contact number
  9. msg=u'This text was sent VIA SMS_Demo.py'
  10. num=appuifw.query(u"Enter Number: ", "number", u"")
  11.  
  12. try:
  13.     if len(num) <10:
  14.         num=ddd
  15. except:
  16.     num=ddd
  17.     print 'Invalid Query! ... Sending Demo Text To', num
  18.  
  19. try:
  20.     messaging.sms_send(u'%d' % (num), msg)
  21. except: print "SMS Unable To Send!"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement