Date from LiveCode to Applescript
zryip theSlug
zryip.theslug at gmail.com
Thu Nov 25 18:19:46 EST 2010
On Thu, Nov 25, 2010 at 10:29 PM, Yves COPPE <yvescoppe at skynet.be> wrote:
> Hi list,
>
> I make a manipulation of date and time in LiveCode and put the it into a variable : tFinalDate
>
> now I'd like to use this var into an applescript command ...
>
> put "tell application ""e&"iCal""e&cr& \
> "tell calendar ""e&theCal"e&cr& \
>
> here comes the incorporation of the variable
> "set theDueDate to tFinalDate + 2 * days"&cr& \
>
> How can I do that ?
>
> Thanks.
>
>
> Greetings.
>
> Yves COPPE
> yvescoppe at skynet.be
Hi Yves,
Assuming the variable "tFinalDate" contains a date time like
"11/26/2010 10:00", you have to convert it as an applescript date. For
doing that you can use the AS date function like this:
"set theDueDate to date(""e&tFinalDate"e&") + 2 * days"&cr& \
Regards,
--
-Zryip TheSlug- wish you the best! 8)
http://www.aslugontheroad.co.cc
More information about the use-livecode
mailing list