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.