Your script snippet works just fine in my script editor (Smile). I ran it,
and it looped several times before I cancelled. Ditto in Apple's Script
Editor. There's nothing wrong with your code.

The "date" construct was introduced (I think) around OS 8.6 in AppleScript
1.3.7. The current version for OS 9.1 is 1.6. What version do you have?
Standard Additions (scripting addition) should be v1.6 also. That might be
the problem.

On or near 6/25/01 7:07 PM, Ken Scott at [EMAIL PROTECTED] observed:

> Hello,
> 
> Earlier, I posted, asking for help finding or writing a script to archive
> messages into subfolders. I have decided (based on emails from Glenn Austin
> and Allan Watson) that I am capable of learning to do this myself.
> 
> So far, I am understanding a little bit of what is going on. However, I am
> confused by trying to build a date from a string. If I stick in a literal
> string, it works. If I build the string and try to construct the date from
> that, I get the following error message:
> 
> Microsoft Entourage got an error: Can't get date "1/1/1999".
> 
> Here is the relevant text. The dialog of datestartText shows correctly. I
> get the error before I get the dialog with the constructed date.
> 
>       set theYear to 1999 -- Year BEFORE we want to start
>       repeat with i from 0 to 59 -- Allow for ten year range
>           set theMonth to (i mod 12) + 1
>           --set datestart to date ((theMonth as text) & "/1/" & (theYear
> as text))
>           --set datestart to date "1/1/1999"
>           set datestartText to (theMonth as text) & "/1/" & (theYear as
> text)
>           display dialog "datestartText: " & datestartText
>           set datestart to date datestartText
>           display dialog "datestart: " & (datestart as text)
>           if datestart > (current date) then exit repeat
>           if theMonth = 12 then set {theYear, theMonth} to {theYear + 1,
> 1}
>           set dateend to (date (((theMonth + 1) as text) & "/1/" &
> (theYear as text))) - (1 * days)
>       end repeat
> 
> Any ideas and suggestions would be appreciated.
> 
> Thanks,
> Ken Scott

-- 
Add me to Palm/Visor: http://signature.coola.com/?[EMAIL PROTECTED]
Allen Watson <[EMAIL PROTECTED]> XNS name: =Allen Watson
A Mac family since 1984 <http://home.earthlink.net/~allenwatson/>
Applescripts for Outlook Express and Entourage:
<http://homepage.mac.com/allenwatson/>


-- 
To unsubscribe:               <mailto:[EMAIL PROTECTED]>
To search the archives: 
          <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>

Reply via email to