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:
"Duane L. Mitchell" <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Fri, 19 May 2006 10:19:44 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
Hello,

After upgrading to Intel Macs, iMac and MacBook, a script has stopped
working. What doesn't work anymore is some date math where the seconds
between two dates is converted to a string. The resulting number is always
in exponential format: 1.3528367587E+17 or something like that. I need a
string to paste into a Word doc.

Here's the script:

property pReferenceDate : date "Wednesday, January 1, 2003 12:00:01 AM"
set vDocNumber to ((current date) - pReferenceDate) as inches as string
display dialog "The number is: " & vDocNumber

The "as inches as string" is my latest attempt at coercing the number to a
string.

I don't have an Intel Mac but have asked someone who does to run the above
script. It works as it should. I'm puzzled as to why these two particular
Intel Macs are having this problem.

I'd welcome any suggestions or comments. Thanks.

-Duane Mitchell

ATOM RSS1 RSS2