• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: duplicate filename error, broken file commands in 10.2?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >duplicate filename error, broken file commands in 10.2? (From: Peter Gort <email@hidden>)

  • Prev by Date: Re: lock the screen from the keyboard, win a prize
  • Next by Date: Re: lock the screen from the keyboard, win a prize
  • Previous by thread: Re: duplicate filename error, broken file commands in 10.2?
  • Next by thread: Big thank you Jay, and the next question is...
  • Index(es):
    • Date
    • Thread