Title: 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

Reply via email to