Date from LiveCode to Applescript

zryip theSlug zryip.theslug at gmail.com
Sat Nov 27 06:09:02 EST 2010


On Sat, Nov 27, 2010 at 7:27 AM, Yves COPPE <yvescoppe at skynet.be> wrote:
> 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.

Hi Yves,

Try this:

on mouseUp
   local tFinalDate,theCal,theEvent,tScriptToDo

   put "11/25/2010" into tFinalDate -- Your date in your own format
   put "MyCalendar" into theCal
   put "MyEvent" into theEvent

   put "tell application "&quote&"iCal"&quote&cr& \
          "switch view to week view"&cr& \
          "tell calendar "&quote&theCal&quote&cr& \
          "set theDate to date("&quote&tFinalDate&quote&")"&cr& \
          "view calendar at theDate"&cr&\
   "end tell"&cr&\
   "end tell" into tScriptToDo
   do tScriptToDo as applescript
end mouseUp


Regards,
-- 
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc




More information about the use-livecode mailing list