Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Here it is as a plug-in' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Here it is as a plug-in
Authored by: rickybuchanan on Dec 14, '07 12:07:10AM
I use a service in Australia - messagenet.net.au - which requires the same mobilenumber@their.server format and hacked together a plugin to do exactly what you described. Feel free to use/modify/etc.:


using terms from application "Address Book"
	on action property
		return "phone"
	end action property
	
	on action title for aPerson with aPhone
		return "SMS With MessageNet"
	end action title
	
	on should enable action for aPerson with aPhone
		return true
	end should enable action
	
	on perform action for aPerson with aPhone
		set fullName to (name of aPerson as string)
		
		set telephone to ""
		if value of aPhone is not missing value then set telephone to value of aPhone
		
		-- TODO Remove any non-number characters from the string
		-- Hack for now: Remove spaces
		set AppleScript's text item delimiters to " "
		set telephone to telephone's text items
		set AppleScript's text item delimiters to ""
		set telephone to "" & telephone
		set AppleScript's text item delimiters to {""}
		
		set emailAddress to telephone & "@messagenet.com.au"
		
		-- display dialog "'" & fullName & "' - '" & emailAddress & "'"
		
		tell application "Mail"
			set newMessage to make new outgoing message with properties {subject:fullName & " <" & emailAddress & ">", content:""}
			tell newMessage
				make new to recipient at end of to recipients with properties {address:emailAddress, name:fullName}
				set visible to true
			end tell
			activate
		end tell
	end perform action
end using terms from

Ricky

---
[Please excuse mistakes/brevity, typed via on-screen keyboard due to disability]

[ Reply to This | # ]