on 25/10/2004 12:44, Bryan Harris at [EMAIL PROTECTED] wrote:
> I have a script that inserts a date stamp into the current document that
> I've used since the OE days (I think...). All of the sudden it inserts
> carriage returns between every element. The result seems to be correct out
> of Script Editor, it just doesn't make it into Entourage correctly. Anyone
> have any idea why it would start doing that?
>
> e.g. Instead of "10/24/04", it does: 10
> /
> 24
> /
> 04
I have no problems with this:
tell application "Microsoft Entourage"
set myDate to (get current date)
set mo to month of myDate as number
if mo < 10 then copy "0" & mo as string to mo
copy day of myDate to da
copy text 3 thru 4 of (get year of myDate as text) to yr
if (day of myDate < 10) then copy "0" & da as string to da
copy (mo & "/" & da & "/" & yr as text) to theTxt
try
set selection to theTxt
on error
display dialog �
"This script can only insert into the body of a message" �
buttons {"OK"} default button 1 with icon stop
end try
end tell
--
Matthew Smith
--
To unsubscribe:
<mailto:[EMAIL PROTECTED]>
archives:
<http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
old-archive:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>