Can someone help me the some sample applescripts for Entourageevents?

B

Ben Compton

It's been a long time since I did any applescript work so I am really rusty
at it. I was looking for a few examples of scripts that create calendar
events. I want exchange information between FileMaker and Entourage.

Thanks
 
B

Ben Compton

I have looked at some of the import export scripts from a few websites but
they are really complex and have lots of error checking. I was hoping for a
few simple examples to use and just plug in the variables and such. If you
can point me to a website that might have some sample scripts that would be
great.
 
B

Barry Wainwright

This is the script 'create event from message' that ships with entourage -
does it give you sufficient head start? Look in the applescript dictionary
for entourage for more information.


tell application "Microsoft Entourage"

-- get the currently selected message or messages
set selectedMessages to current messages

-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this
script." with icon 1
return
end if

repeat with theMessage in selectedMessages

-- get the information from the message, and store it in variables
set theName to subject of theMessage
set theCategory to category of theMessage
set theContent to content of theMessage

-- create a new event with the information from the message
set newEvent to make new event with properties {subject:theName,
category:theCategory, content:theContent}

-- create a link between the message and the new event
link theMessage to newEvent

-- if there was only one message selected, then open that new event
if (count of selectedMessages) = 1 then open newEvent
end repeat
end tell
 
Top