Re: Writing to a file
Re: Writing to a file
- Subject: Re: Writing to a file
- From: JP Kelly <email@hidden>
- Date: Sun, 14 Jul 2002 09:57:55 -0700
On 7/14/02 2:06 AM, "Andy Wylie" <email@hidden> wrote:
>
on 14/7/02 8:22 PM +1200: JP Kelly wrote:
>
>
> I am trying to write to a file that already exists.
>
> Here is the offending line:
>
>
>
> set fileRef to (open for access file "Users:jpkelly:Library:Application
>
> Support:mover.prefs" with write permission)
>
>
>
> This gives me an error: "Finder got an error: Duplicate file name."
>
>
>
> I believe this was not a problem in OS 9.
>
> How can I write to an existing file?
>
>
>
The read/write commands belong to Std Additions OSAX, OSAX calls in
>
application tell blocks are not recommended and broken under x, if that's
>
not the case try removing those parentheses.
>
_____________________________ Andy
They were in a tell block but moving it outside the tell block produced the
same error.(without the "Finder got an error:" part) Same with removing the
parentheses.
Also If I delete the file I get an error saying the file is already open
even though this is the first place in the script I used the open command.
Is there another way to write to an existing file.
jp
_______________________________________________
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.