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 "&quote&"iCal"&quote&cr& \
         "tell calendar "&quote&theCal&quote&cr& \
         "set theDueDate to (date("&quote&tFinalDate&quote&")) + 2 * days"&cr& \
         "make new event at end with properties {start
date:theDueDate,summary:"&quote&theEvent&quote&"}"&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

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to