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

Click here to return to the 'Would be better as a Plug-in' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Would be better as a Plug-in
Authored by: alexmathew on Dec 12, '07 05:30:24PM

I was looking for something similar to this to take Fax numbers and use Internet Fax services such as Jfax, Efax, Maxemail etc. The address would be some thing like where 18885551212 is the fax number of the contact. However, I am not sure if I want to add a site specific info like Maxemail - or Teleflip in this case - to every one of my contacts. If the site/company goes out of business, I'm left with all these e-mail addresses that I would have to change manually or write another script.

Would a better solution be to use an Addressbook plug-in to do this on the fly ? - so that I can click on a fax number ( mobile number in your case) and choose "send Fax/Teleflip via e-mail to". The plug-in could just do the parsing etc on the fly and create an e-mail in Mail?

[ Reply to This | # ]
Would be better as a Plug-in
Authored by: whenders0n on Dec 13, '07 09:52:40AM

That would be cool but the point of this script was more for being able to send free SMS's via an iPhone/Blackberry.

[ Reply to This | # ]
Here it is as a plug-in
Authored by: rickybuchanan on Dec 14, '07 12:07:10AM
I use a service in Australia - - 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 & ""
		-- 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
		end tell
	end perform action
end using terms from


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

[ Reply to This | # ]