Date from LiveCode to Applescript
zryip theSlug
zryip.theslug at gmail.com
Thu Nov 25 18:42:19 EST 2010
In case it could be of some interest for someone else in the list, a
full example for adding a new event in iCal with applescript:
on mouseUp
put "11/25/2010 09:00" into tFinalDate -- Your date time in your own\
format here (MM/DD/YYYY HH:MM or DD/MM/YYYY HH:MM)
put "MyCalendar" into theCal
put "MyEvent" into theEvent
put "tell application ""e&"iCal""e&cr& \
"tell calendar ""e&theCal"e&cr& \
"set theDueDate to (date(""e&tFinalDate"e&")) + 2 * days"&cr& \
"make new event at end with properties {start
date:theDueDate,summary:""e&theEvent"e&"}"&cr&\
"end tell"&cr&\
"end tell" into tScriptToDo
do tScriptToDo as applescript
answer the result -- the result should contain the id of the new
calendar event
end mouseUp
Be sure to have the "MyCalendar" calendar created in iCal.
The calendar event named "MyEvent" will be created in date of
"11/25/2010" + 2 days = "11/27/2010" at 9:00
Regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list