logging to a file?
logging to a file?
- Subject: logging to a file?
- From: Aaron Rosenblum <email@hidden>
- Date: Fri, 12 Nov 2004 18:52:49 -0500
Hey all,
Two quick questions. I have this code that I want to log to a file.
(Basically like NSLog) How do I insert a newline at the end of the line
I am writing to a file, and also how to I dynamically resolve the path
to the users home folder instead of hard coding it.
sorry if these are simple questions, but im an AS newbie...
Aaron
set theTargetFile to ("Macintosh HD:Users:myuser:output.txt" as string)
as file specification
try
open for access theTargetFile with write permission
write ((current date) & "Working on " & this_item as string) to
theTargetFile starting at eof
close access theTargetFile
end try
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden