Newbie Q on self-executing log app
Newbie Q on self-executing log app
- Subject: Newbie Q on self-executing log app
- From: email@hidden
- Date: Wed, 26 Mar 2003 19:51:54 EST
I'm trying to set up a self-executing app to log the times of the day that a
computer is both turned on and off, which I had figured on placing aliases of
in the Startup Items and Shutdown Items folders (OS 8.6). To that end the
following was written:
tell application "Finder"
get (current date)
copy (result as string) to the clipboard
tell application "Scriptable Text Editor"
activate
open document "Macintosh HD:TemporaryStuff:untitled"
paste contents of clipboard
set (return) to last character of text
close document "untitled" saving yes
quit
end tell
end tell
However, apparently there's a bit of trouble coercing the current date to a
string, as the command "copy (result as string) to the clipboard" results in
the following error message:
--> Can't set the clipboard of "Wednesday, March 26, 2003 9:25:39 AM" to
B+scriptB;.
Is this not possible? Or do I need a subroutine to do this? Or, worse yet, am
I missing something obvious? If so how must one go about this and why?
Also could you offer pointers on how to make this self-executing; that is,
without that dialog box with the "Run" radio button.
TIA for your help.
Mike
email@hidden
**************************************************
"The work of the individual still remains the spark
that moves mankind forward." bIgor Sikorsky
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.