Re: How to read syntax description
Re: How to read syntax description
- Subject: Re: How to read syntax description
- From: John Delacour <email@hidden>
- Date: Sat, 26 Oct 2002 17:57:19 +0100
- Mac-eudora-version: 5.3a7
At 6:53 pm +0200 25/10/02, Roger Gilliar wrote:
>
Can someon explain me how to read the following syntax description ?
>
>
Class event: This class represents an event
>
Plural form:
>
events
>
Properties:
>
<Inheritance> item [r/o] -- All of the properties of the superclass.
>
start date date -- The event start date
>
sequence integer -- The event version
>
description Unicode text -- This is the event description.
>
stamp date date [r/o] -- The event last stamp date
>
recurrence Unicode text -- The iCAL string describing the event recurrence, if defined
>
status none/cancelled/tentative/confirmed -- The event status
>
summary Unicode text -- The event summary
>
end date date -- The event end date, if defined
>
uid Unicode text [r/o] -- An unique event key
>
>
I tried something like
>
>
tell application "iCal"
>
activate
>
set eventList to event with start date "01/01/2002"
>
end tell
I see no one has given a satisfactory answer to this.
1. You need to tell a calendar
2. The date needs to be a date and not just a string
3. The date needs to be precise to the second!
set varDatestring to "28 October 2002 08:00"
set varDate to date varDatestring
tell app "iCal" to tell the front calendar
JJJJJJ set eventList to events whose start date is varDate
JJJJJJ set event1 to the first item in eventList
JJJJJJ get the properties of event1
end
If you want to get events for a day without specifying the exact 'startJdate', then you need to do this:
set varDatestring to "28 Oct 2002"
set varDate to date varDatestring
set varnextday to varDate + (60 * 60 * 24)
tell app "iCal" to tell the front calendar
set evLs to events whose start date>varDate and start date<varnextday
set event1 to the first item in evLs
get the properties of event1
end
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.