MACSCRPT Archives

May 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Paul Berkowitz <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 19 May 2006 20:33:02 -0700
Content-Type:
text/plain
Parts/Attachments:
text/plain (28 lines)
On 5/19/06 7:14 PM, "John Baxter" <[log in to unmask]> wrote:

> Did the script travel to the client with the problem as a compiled
> script containing the reference date?  If so, one thing to try would
> be to send it in text form and have it compiled on the client's
> machine (or compile it on a (borrowed if necessary, as it would be
> here) Intel machine and send that complied version).  The fact
> scripts created on Intel machines are running sensibly somewhat
> encourages these ideas.

That's right. just don't include a compiled date object in the script. Do it
in such a way that that date is compiled while being run. You have to sort
of "sneak" that in, since even setting a variable to 'date someText' where
someText is a date string will compile at source - which you don't want. The
best way to do that is probably something like

    set d to (current date)
    set month of d to February
    set day of d to 6
    set year of d to 2007
    set time of d to (10 * hours)

That will work no matter what international date and time formats the user
machine uses.

-- 
Paul Berkowitz

ATOM RSS1 RSS2