Date from LiveCode to Applescript

Yves COPPE yvescoppe at skynet.be
Sat Nov 27 01:27:19 EST 2010


Hello tjheSlug


Very good and fantastic script
works great

Another question about that

is it possible to have a script to force iCal to open at this date (a variable date) in a weekly presentation ?

thanks.

Le 26 nov. 2010 à 00:42, zryip theSlug a écrit :

> 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
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Amicalement.

Yves COPPE
yvescoppe at skynet.be




More information about the use-livecode mailing list