Re: duplicate filename error, broken file commands in 10.2?
Re: duplicate filename error, broken file commands in 10.2?
- Subject: Re: duplicate filename error, broken file commands in 10.2?
- From: John Delacour <email@hidden>
- Date: Sat, 23 Nov 2002 23:28:39 +0000
- Mac-eudora-version: 5.3a9
I should have added that it's important not to use the term 'file' in
this context within an application tell block. If you do so with
BBEdit, for example, things won't work because 'file' will be
interpreted wrongly. So you can use the syntax blow, which is more
concise. Note that 'file pathname' does not need to exist, in
contrast to 'alias pathname', which must already exist.
set tmp to ":private:tmp:"
-- Don't put the next line in an application 'tell' block
set f to file ("" & alias tmp & "junk.txt")
--> file "dx:private:tmp:junk.txt"
try -- allow for errors that have left the file open
close access f
end try
open for access f with write permission
--> 62 or any number
set eof f to 0
write "hello" to f
close access f
read f
--> "hello"
JD
_______________________________________________
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.