• 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: Very basic "write to file" query
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Very basic "write to file" query (From: email@hidden)

  • Prev by Date: Very basic "write to file" query
  • Next by Date: Scripting iCal
  • Previous by thread: Very basic "write to file" query
  • Next by thread: Re: Very basic "write to file" query
  • Index(es):
    • Date
    • Thread