What happened to my scripts?!?!?

Some months (and months) ago, someone in this group was kind enough to help me set up a script which would write the current date and time to a text file. Everything has been working great, but something has happened which I cannot explain, as I discovered when I tried to use the script just now.

I have upgraded from OS 9.0.4 to 9.1 since the script last worked, if that could have had an effect. I have searched the archive and can’t find any mention of the previous messages.

Can someone tell me what has happened to this script? What it should say?

set jobLog to “HD:Documents:Job Log”
set theDate to («event misccurd») as text

«event rdwropen» file jobLog with «class perm»
set the_eof to («event rdwrgeof» file jobLog)
«event rdwrwrit» (date string of («event misccurd») & tab & time string of («event misccurd») & tab) given «class refn»:file jobLog, «class wrat»:(the_eof + 1)
«event rdwrclos» file jobLog

Are your FIVE security modules safeguarded at Extensions folder?
Is your “Standard Additions” osax at Scripting Additions folder?
“misccurd”, “rdwrgeof” and those raw guys are part of standard additions and seems that they are not active or, at least, applescript can’t communicate them :rolleyes:

Assume you are referring to these five:
Security Cert Module
Security Library
Security Manager
Security Policy Module
Security Storage Module

Yes, they are in Extensions folder.

Yes, Standard Additions is in Scripting Additions folder.

Have you tried to recompile the script? If so, and that didn’t work, I’d copy and paste it into a new Script Editor window and see if things straighten out.

Here’s what it should look like:

set jobLog to "HD:Documents:Job Log"
set theDate to (current date) as text

open for access file jobLog with write permission
set the_eof to (get eof file jobLog)
write (date string of (current date) & tab & time string of (current date) & tab) to file jobLog starting at (the_eof + 1)
close access file jobLog

Copying and pasting as given, I get error:

Expected “,” but found class name

when it hits the word “date” in (current date).

I’d try an applescript update… I remember version 1.8.2b3 worked fine at 9.1…

The script worked fine under AS 1.4, OS 9.0.4.

When I upped to OS 9.1, I received AS 1.5.5 (?) and the script wouldn’t work.

Upped AS to 1.8.2b3, and things are working properly again.