• 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: Problems Writing to a File
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems Writing to a File


  • Subject: Re: Problems Writing to a File
  • From: Steve Suranie <email@hidden>
  • Date: Thu, 10 Nov 2005 14:05:36 -0500
  • Thread-topic: Problems Writing to a File

Same problem, with or without the tell block. Could this be some sort of
issue with Tiger?


On 11/10/05 1:53 PM, "Michelle Steiner" <email@hidden> wrote:

> On Nov 10, 2005, at 11:20 AM, Steve Suranie wrote:
>
>> set theFilePath to (path to desktop) &
>> "archiveTool:htmlFiles:tempFile.txt"
>> as string
>> set theContent to "This is a test"
>>
>> my writeFile(theFilePath, theContent)
>>
>> on writeFile(theFilePath, theContent)
>>     tell application "Finder"
>>         set f to (open for access theFilePath with write permission)
>>         write theContent to f
>>         close access f
>>     end tell
>> end writeFile
>>
>> I get an error message in the subroutine telling me the Finder
>> cannot find
>> the file. I've tried open for access file theFilePath, open for
>> access alias
>> theFilePath, wrapping it in a tell application "Finder" call and I
>> still get
>> the same error.
>
> Once I created the required nested folders on my desktop, your code
> worked with modifications; I removed the Tell block (it is not
> required).
>
> Double check your original code to ensure there are no typos in the
> string containing the path name.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Problems Writing to a File
      • From: Michelle Steiner <email@hidden>
References: 
 >Re: Problems Writing to a File (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: Problems Writing to a File
  • Next by Date: Re: Problems Writing to a File
  • Previous by thread: Re: Problems Writing to a File
  • Next by thread: Re: Problems Writing to a File
  • Index(es):
    • Date
    • Thread