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 13:14:58 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (27 lines)
On 5/19/06 12:34 PM  John Delacour  [log in to unmask]  said:


> In 10.4.6 'display dialog' will automatically coerce the sci notation
> to string provided to don't try your own coercion first.
> 
> But I'm guessing you don't want a dialog and the simplest trick I
> know of is to get Perl to do it, as below:
> 
> 
> property pReferenceDate : "1/1/1803"
> set vDocNumber to ((current date) - (get date pReferenceDate))
> --=> 6.418113912E+9
> display dialog "" default answer vDocNumber
> -- or
> do shell script "perl -e 'print " & vDocNumber & "'"
> --=> 6418114152

John, thanks. The display dialog was thrown in for my testing, I should have
noted that, it's not used anywhere in the actual script. The OS versions
that the script is running on is 10.4.4 and 10.4.5. When the user runs the
script they error.

Thanks for the Perl script, I may end up using it!

-Duane

ATOM RSS1 RSS2