×
Namespaces

Variants
Actions

Archived:SMS Timer - small app using PySymbian

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngAquivado: Este artigo foi arquivado, pois o conteúdo não é mais considerado relevante para se criar soluções comerciais atuais. Se você achar que este artigo ainda é importante, inclua o template {{ForArchiveReview|escreva a sua justificativa}}.

All PySymbian articles have been archived. PySymbian is no longer maintained by Nokia and is not guaranteed to work on more recent Symbian devices. It is not possible to submit apps to Nokia Store.

This PySymbian messaging application sends a predefined SMS to the recipient at a specific time.

Article Metadata
Article
Created: User:Kandyfloss (10 Apr 2008)
Last edited: hamishwillee (31 May 2013)

Below is the code for the same.

#SMS Timer
#import the module inbox (that handles incoming sms things)
import inbox
#import the module e32
import e32
#import the module appuifw
import appuifw
#import the module messaging
import messaging
 
#set application title
appuifw.app.title=u"SMS Timer"
 
# Define exit function
def exit_key_handler():
app_lock.signal()
 
 
def run():
 
 
# define the list of items (items must written in unicode! -> put a u in front)
L = [u'Set Timer',u'Exit']
 
# create the selection list
index = appuifw.selection_list(choices=L, search_field=1)
 
#Trigger action upon index
 
if index == 0:
data = appuifw.query(u"Enter SMS text","text")
number=appuifw.query(u"Enter recepient number","text")
appuifw.note(u"Enter time to wait before sending !", "info")
t=appuifw.query(u"Send after time (in mins) :","number")
t=t*60
while t>0:
e32.ao_sleep(1)
t=t-1
messaging.sms_send(number, data)
appuifw.note(u"Message sent!", "info")
run() # Again call the main function
if index == 1:
exit_key_handler()
 
#calls the main function
 
run()
 
app_lock = e32.Ao_lock()
 
appuifw.app.exit_key_handler = exit_key_handler
app_lock.wait()

Here are some screenshots that demonstrate the working of the application - SMS timer


Screenshot0023.jpgScreenshot0024.jpgScreenshot0025.jpgScreenshot0026.jpgScreenshot0027.jpg

This page was last modified on 31 May 2013, at 04:05.
44 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×