I ran the script as you sent it back, and it works. You say nothing happens. I think what happens is too subtle for you to notice. If you selected a contact, when the script completes, there will be a link on the contact. If you click the "link" icon, you will be able to open the task that was created.
If you prefer to have the task open immediately, just add the line "open n" at the end of the script, right before the "end tell". -- Microsoft MVP for Entourage/OE/Word Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson Applescripts for Outlook Express and Entourage: <http://homepage.mac.com/allenwatson/> > From: Richard Shane <[EMAIL PROTECTED]> > Reply-To: "Entourage:mac Talk" <[EMAIL PROTECTED]> > Date: Wed, 19 Dec 2001 16:36:18 -0700 > To: [EMAIL PROTECTED] > Subject: Automating Contact-T0-Task function > > Allan > > Here is the script. I select contact, run script, and nothing happens > > --New Task (or event) from selected contact; assign to kbd shortcut > tell application "Microsoft Entourage" > try > set theSelection to get selection -- may be none > if class of theSelection � list or (count > theSelection) � 1 or class of item 1 of theSelection � contact then > error number -128 > on error > beep > display dialog "You must select just one contact in > the address book." buttons {"OK"} default button "OK" with icon 2 > return > end try > activate > set theContact to item 1 of theSelection > set theName to name of theContact > if theName = "" then set theName to company of theSelection > set n to make new task with properties {name:theName} > -- or event > link n to theContact > end tell > > or > > --New Task (or event) from selected contact; assign to kbd > shortcut > tell application "Microsoft Entourage" > try > set theSelection to get selection -- may be none > if class of theSelection � list or (count theSelection) � 1 > or class of item 1 of theSelection � > contact then error number -128 > on error > beep > display dialog "You must select just one contact in > the address book." buttons {"OK"} default button "OK" with icon 2 > return > end try > activate > set theContact to item 1 of theSelection > set theName to name of theContact > if theName = "" then set theName to company of > theSelection > set n to make new task with properties {name:theName} > -- or event > link n to theContact > > -- > > > http://www.drshane.com > 303-449-0778 > 3985 Wonderland Hill Avenue > Boulder, Colorado 80304 -- To unsubscribe: <mailto:[EMAIL PROTECTED]> To search the archives: <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
