Re: Stay open Apple Script to track all events
Re: Stay open Apple Script to track all events
- Subject: Re: Stay open Apple Script to track all events
- From: Michelle Steiner <email@hidden>
- Date: Sat, 10 Feb 2001 10:09:43 -0800
On 2/10/01 9:10 AM, What does not kill you only makes you stronger
<email@hidden> wrote:
>
on run
>
--do stuff
>
--write to text file time script started
>
end run
>
>
on idle
>
--do stuff
>
--write to text file time something was done
>
end
>
>
on quit
>
--write to text file time script quit
>
continue quit
>
end
How's this for a start?
--Michelle
on run
--do stuff
my journal("Applet started")
end run
on idle
--do stuff
--write to text file time something was done
end idle
on quit
my journal("Applet quit")
continue quit
end quit
on journal(whatHappened)
set now to (current date) as string
set itemToRecord to now & ": " & whatHappened & return
set the journalfile to (path to startup disk as text) & "Journal"
open for access file journalfile with write permission
set the fileEnd to get eof of file journalfile
write itemToRecord to file journalfile starting at fileEnd + 1
close access file journalfile
end journal
----------------------------------------------------------------------
| Michelle Steiner | We're not human beings having a spiritual |
| | experience. We're spritual beings |
| email@hidden | having a human experience. |
----------------------------------------------------------------------