Hello,
I´ve found a applescript written by Brian Wainright, because the script
cause and error "Expect End of File but unknown token was found" in the
line: " set theContacts to every contact whose birthday ‚ "" "
With a help from a friend, i´ve found the error. Here is the working script:
-- Add All Birthdays to Calendar v1.0 (2008-03-20)
-- an applescript by Barry Wainwright <mailto:
[email protected]>
-- Adds a yearly recurring event for all contacts with a birthday defined
-- This script released under a Creative Commons Attribution, NonCommercial,
-- ShareAlike 2.0 England & Wales License.
-- see <
http://creativecommons.org/licenses/by-nc-sa/2.0/uk/>
-- for full details
tell application "Microsoft Entourage"
set theContacts to every contact whose birthday is not equal to ""
repeat with acontact in theContacts
set oldDelims to AppleScript's text item delimiters
set AppleScript's text item delimiters to {" "}
tell acontact
set theName to {last name, first name}
set theDate to birthday
tell me to set theDate to date theDate
make new event with properties {subject:"Birthday:
" & theName, start time:theDate, end time:theDate, recurring:true,
recurrence:"FREQ=YEARLY;INTERVAL=1;WKST=SU", all day event:true, remind
time:7200}
end tell
set AppleScript's text item delimiters to oldDelims
end repeat
end tell
I´ve added a reminder five days before and removed the startdate for the
recurrence. But now, I´ve some other problems/questions. I want this Script
working like a manuel click at the symbol right next to the birthday date in
a contact and so some informations are lost.
- How can i add a new item to the links of a contact with the event id of
the new event?
- How can I add a category to this new event?
- I want to change the default subject to "Geburtstag: lastname, firstname)
but if I do this the title was changed to this but if I open the event the
subject is only "lastname, firstname).
I hope somebody will help me. I´m new to mac, entourage and applescript -
but i want to learn
.
Thanks,
Michael