Re: Very basic "write to file" query
Re: Very basic "write to file" query
- Subject: Re: Very basic "write to file" query
- From: Doug McNutt <email@hidden>
- Date: Wed, 4 Feb 2004 12:15:21 -0700
At 18:27 +0000 2/4/04, email@hidden wrote:
>
try
>
set file_ to ((path to desktop) & "test file") as Unicode text
>
open for access file_ write permission 1
>
copy the result to file_reference
>
write "test" starting at 0 to file_reference
>
close access file_reference
>
on error err_msg
>
close access file file_
>
display dialog err_msg buttons {"-"} default button 1
>
end try
Don't you mean
close access file_reference (ignoring any error)?
I wouldn't be surprised if AppleScript interpreted your version to be a second pass at an already open file - error -48. But then if the try fails on open file_reference isn't defined. . .
--
--> There are 10 kinds of people: those who understand binary, and those who don't <--
_______________________________________________
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.