Script events in entourage

P

peterthebag

Hi,

I am running 10.4.8 and office 11.3.5 , entourage 11.3.3

I am new to programing and am having troubble Applescripting
entourage.
I have looked for previous posts on this issue, but could not get what
I needed from them (this may be due to my ilack of knowledge). I was
wondering if anyone could advise me.

What I am wanting to do is to use a script to "automate" creation of
entourage events. It should display dialoge boxes which I input data
into, which it then uses to create the events. I am trying to get it
to set all the major properties: name, start and end date and time,
category, and repetition.

I have tried several ways of doing this, but all I can do is get it to
create an event with the name and category I give it. Everything else
is ignored, or I get error messages, or both.

One attempt uses the following code.

tell application "Microsoft Entourage"

-- get the information, and store it in variables

display dialog "Subject: " default answer ""
set theName to the text returned of the result

display dialog "Enter Event Category: " default answer ""
set thecategory to the text returned of the result

display dialog "Enter Start of the event" default answer ""
set thestart to the text returned of the result

display dialog "Enter End of the event" default answer ""
set theend to the text returned of the result

display dialog "Is this reccuring: " default answer "n"
set recur to the text returned of the result

display dialog "Frequency: " default answer ""
set rep-frequenc to the text returned of the result

display dialog "Number of times: " default answer ""
set repeats to the text returned of the result

display dialog "Interval: " default answer ""
set r-interval to the text returned of the result

set newEvent to make new event with properties ¬
{subject:theName}
set category of newevent to thecategory
set start of newEvent to theStart
set end of newEvent to theend
set recurring of newEvent to recur
set recurrence of newevent to {Rrule:FREQ=rep-
frequenc;COUNT=repeats;INTERVAL=r-interval}

end tell

Unfortunately script editor complains of an "unknown token", wich
seems to be the ";"

I removed the referance to recurrance. I eally do need the
recurrance, as most of my appointments are recurring. However, I
thought it would make the problem easier to solve.

If I use this as the last section of the code.


set newevent to make new event with
properties{subject:thesubject,starttime:{date:thestart}, end time:
{date:theend}, category:{category:theCategory}} ¬
end tell

this gets the response "expected a referance"


if I use this as the last paragraph

set newEvent to make new event with properties ¬
{subject:theName, category:{category theCategory}, start time:{start
time:theStart}, end time:{end time:theend}}
end tell

this will create an event, but the dates it sets are default, eg
01/01/04

Is there anyone who can tell me how to make this ( and the recurrance)
work?

I am inputting date data into the dialog box as

11/06/2007 13:00

for the start

and

11/06/2007 13:30

for the end

Many thanks,

Peter
 
D

Diane Ross

I am new to programing and am having troubble Applescripting
entourage.

If you haven't discovered it yet, ScriptBuilders is a great place to find
AppleScripts for Entourage.

<http://scriptbuilders.net/>

If one of the scripters doesn't come along soon, ask on the Entourage talk
list. There are a lot of scritpers on the list and it's fairly low traffic
and a great place to get to know many long time Entourage users.

<http://www.entourage.mvps.org/support_options/subtalk.html>

Lastly, see the Favorite Scripts page:

<http://www.entourage.mvps.org/script/fav_scripts.html>
--
Diane Ross, Microsoft Mac MVP
Entourage Help Page
<http://www.entourage.mvps.org/>
Entourage Help Blog
<http://blog.entourage.mvps.org/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top