pyS60 Automatic SMS sender
Ever felt like sending a predefined message to someone automatically after x seconds? Annoy someone ? If you have a smartphone with pyS60 installed it’s just 13 lines of copy-paste. Code and instructions after the break.
The Script :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # 25/03/2009 -- Surya - HAKC.NET import messaging import appuifw import e32 #import the modules. number = "123456789" #define the recipient phone number here text = "Hi :}" #define the message here i = 0 #counter initial value while True: #infinte loop tex = appuifw.note(u"Sending!") #Throw a dialog box just before the message is sent messaging.sms_send(number, text) #Send the message tex = appuifw.note(u"Sent!") #Throw a dialog box after the message is sent print i #Print the counter in Python Console i=i+1 #Increment the counter e32.ao_sleep(300) #Wait for 5 minutes (value to be given in seconds) before the next # NOTE : You do get charged for every text sent (unless it's free). I don't endorse spamming. |
The script is not a biggie. It just sends sends the predefined text to the predefined number in an infinte While loop which sleeps for the defined seconds before the next iteration.
How to execute ? If you don’t have the Python installed in your Series 60 phone, get it here. Just copy the above snippet create a new ‘I_am_so_kewl.py‘ file in your pc, paste and save the above snippet. Then transfer the file to the Python directory in the mem card/phone memory. Open Python shell in the phone (usually in the ‘Applications’ folder), Options->Run Script-> Browser for ‘I_am_so_kewl.py’, execute it and watch the magic happen. Make sure that once you run the sript you don’t exit the python shell, you can just click the menu button and python will silently run with the evil script in the background. If you’re just curious to check how many messages have been sent, just open the python shell again and you’d have the latest counter read printed (add 1 to it; I was too lazy to increment it in the script). More information on pyS60 : Nokia Wiki, Croozeus and Mobilenin.
Special thanks goes to my first victim for being the guinea pig and the inspiration behind this. Some might look at the code, the other way and might put this into work for evil purpose; I don’t endorse that.

This post has 8 comments
March 28th, 2009
who was the first guy?
also i have symb 80 ..what will i do sirjee ?
March 28th, 2009
W__k, s80 doesn’t deserve it. Read this.
April 6th, 2009
This application is just what i am looking for for a project i am working on (only want to send the SMS once though).
What i would also ideally like to do is include the integrated GPS coordinates in the sms. Any idea if this is possible?
Would be using something like a Nokia N85 or N95
April 8th, 2009
Possible. For sending only one SMS, strip off the while loop from the code.
You can read the GPS Coordinates using pyS60. http://wiki.forum.nokia.com/index.php/How_to_read_GPS_data would help you.
If you’re trying to ‘update’ real-time position to the web or something just a friendly warning; it has been already done. I can improve this, with the GPS addon let me know if you need it.
June 1st, 2009
Hi there!
First up: I’m a complete newb to mobile phone applications, and don’t know if anyone will be able to help, but I figure it can’t hurt to ask… please be gentle!!
I want to do something similar to the above application, but I’d like a weekly SMS containing the details (mainly file creation time/date) of the last photo stored on the phone’s SD card. Does this sound even remotely possible to anyone? (Obviously the weekly bit is pretty simple…)
Thanks for reading, any feedback (even if it’s to say that no, this can’t be done) is much appreciated!
John.
June 5th, 2009
I’m not really sure how you can accomplish that but there should be a way. I haven’t worked on anything like that yet. I’d suggest heading over to the Croozeus/Nokia Dev Forum and clearing it up. Some Google says me that it should be something related to the e32 module.
June 15th, 2009
Thanks for the help – I ‘lost’ this webpage so it’s taken me a while to get back to you!
I’ll try chasing something down via the info you’ve supplied, even though I’ve got no idea what an e32 module might be… Oh well, just another chance to learn something new I guess!
Thanks again, John.
March 6th, 2010
hello
Add a comment