Title: Re: Transfer to Archive script error
To everyone who is having trouble getting the "Transfer to Archive (Entourage)" script to work:

On or near 11/16/00 7:04 AM, Steve Sanz at [EMAIL PROTECTED] observed:
>
> You can see I have these versions. How perplexing.
> From the Entourage list, it seems others are having the same problem.
> Shall we ask the list, someone at Microsoft, someone at Apple?
>
No, I think I finally have a handle on it!

Insert this at the beginning of your copy of the script:

-- Handler from a message sent by Richard 23
-- on Thursday, September 28, 2000 8:35:54 AM
on DateString(theDate)
    (offset of (text 1 thru 3 of (theDate's month as string)) in
“JanFebMarAprMayJunJulAugSepOctNovDec") div 3
    text -2 thru -1 of ("0" & result) & "/" & text -2 thru -1 of ("0" & theDate's day) & "/" & text -2 thru -1 of (theDate's year as string)
end DateString

Then, in the place where we are getting the error, change this line:

    set theDate to date string of daterec in short format

To this:

    set theDate to DateString(daterec)

The situation is this: "in short format" was a parameter of the "date string for" command that is part of the "Date String For" scripting addition (osax), which I have on my system, and which the original script used. My copyof the script is unmodified, and it worked because I was still using that earlier osax. I attempted to modify the script to use the now-standard "date string" command, which is now part of standard AppleScript, but that command does not support the “short format” parameter! This is why, when you try to run, you get a message or result showing something like "Can't get dateRec of short format" or when you try to compile something like "«constant frmTshFM»". I think the former occurs if you <have> "Date String For" installed, while the latter occurs if you do not.

So you either need to generate the short format date as I have done above using "vanilla" AppleScript, thanks to Richard23 on the AppleScript list, or else you need to reinstall the "Date String For" osax, and change that line back to: "set theDate to date string for daterec in short format". Note that it says "for" and not "of".

Please let me know if this works! I plan to update the copy of the transfer script that is on my web site to include the subroutine/handler for DateString.
--
Peace,
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
A Mac family since 1984
My web page: <http://home.earthlink.net/~allenwatson/>

Reply via email to