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


Click here to return to the '10.3: Schedule calls in iCal from Address Book' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.3: Schedule calls in iCal from Address Book
Authored by: mschmidl on Sep 12, '07 02:45:38PM
to insert the choosen phone number in the comment field of the created TODO is easy to achieve:
using terms from application "Address Book"
	on action property
		return "phone"
	end action property
	
	on action title for p with e
		set theName to (first name of p) & " " & (last name of p)
		return "call " & theName
	end action title
	
	on should enable action for p with e
		return true
	end should enable action
	
	on perform action for p with e
		set theName to (first name of p) & " " & (last name of p)
		set theNumber to (value of e)
		scheduleCall((id of p), theName, theNumber)
	end perform action
	
end using terms from

on scheduleCall(id, name, phonenum)
	tell application "iCal"
		set theItem to (make new todo at end of todo of calendar 1)
		set summary of theItem to "Call " & name
		set url of theItem to "addressbook://" & id
		set description of theItem to phonenum
		activate
		show theItem
	end tell
end scheduleCall
HAVE FUN

[ Reply to This | # ]