Sending text message to TMobile phone

I have a script to send me an sms message through tmobile’s website, the only problem with it is that it doesn’t work through the screen saver (which has a password). I had to do everything through IE because you need to check a checkbox on the page to submit the actual message. here is what i have, it works fine unless the screen saver is up, but the whole point is for it to run while I am away.

set the_number to "5555555555"
set the_from to "From Name"
set the_message to "My Message"

tell application "Internet Explorer"
	Activate
	GetURL "http://www.t-mobile.com/messaging/default.asp?nav=hm"
end tell
tell application "System Events"
	tell process "Internet Explorer"
		
		delay 10
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke the_number
		keystroke tab
		keystroke tab
		keystroke the_from
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke tab
		keystroke the_message
		keystroke tab
		keystroke return
		keystroke tab using shift down
		keystroke tab using shift down
		keystroke tab using shift down
		keystroke tab using shift down
		keystroke tab using shift down
		keystroke return
		delay 10
	end tell
end tell

tell application "Internet Explorer"
	quit
end tell

p.s. if anyone know of an easier way to send a text message to a tmobile phone, please let me know.

thx

Yeah, all you have to do is send an email. Here’s how you do it in Mail (no keystrokes required):

set the_number to "2125551212@tmomail.net" --adjust the number to your T-Mobile cell number, the domain is fine
set the_message to "My Message"
set the_subject to "My Subject"

tell application "Mail"
	set new_message to (make new outgoing message at end of outgoing messages)
	tell new_message
		set visible to true
		make new to recipient at end of to recipients with properties {address:the_number}
		set subject to the_subject
		set content to the_message
		send
	end tell
end tell

Jon

perfect works great. Thanks!