Re: Login AppleScript won't write to file - UPDATE
Re: Login AppleScript won't write to file - UPDATE
- Subject: Re: Login AppleScript won't write to file - UPDATE
- From: Sun Real <email@hidden>
- Date: Sat, 30 Jun 2001 12:00:35 +1000
Timothy K. Wilkinson's message of 29/6/01 10:28 PM contained:
>
...Here is
>
the entire code....
I don't have iDo so I can't test this, sorry. Nor can I see anything
immediately wrong apart from the lack of an explicit 'open for access',
as previously noted. What I can suggest, in the absence of anything more
obvious, is to replace the line below:
>
write loginData to file loginFile starting at eof
With this call to a standard write handler:
writeWithAppend at loginFile from loginData
...And put the following handler in your script (just above or below your
other sub-routine(s)):
-- pass a full path string & the data to write to the file
on writeWithAppend at pathString from writeString
try
set the ofaNum to open for access file pathString with write permission
write the writeString to the ofaNum starting at eof
close access the ofaNum
return the pathString
on error errMsg number errNum
try
close access the pathString
end try
error errMsg number errNum
end try
end writeWithAppend
I hope this fixes the problem, though I'm not convinced that it will.
I have another another question too - does the script fail running from
iDo if the server volume is already mounted when the script starts?
Let us know how you go.
Cheers,
Richard Morton
-- Great Lies of the Music Business: "We'll definitely come to the gig"