• 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: open for access file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: open for access file


  • Subject: Re: open for access file
  • From: "Stockly, Ed" <email@hidden>
  • Date: Thu, 16 Jul 2009 11:24:43 -0700
  • Thread-topic: open for access file

>> Mine is a domestic setup, a destop plus a laptop, a wireless router, which I
suppose makes it a network.

No that doesn't explain it.

So far, I don't think anyone has been able to duplicate that specific error,
with this script, but that happens sometimes and we can go on without
letting it hang everything up.

Have a look at this, paste it into script editor and run it. (Be sure to
open the log first)

----------
set StoryFile to (path to users folder as string) & "ThreePigs.txt"
log StoryFile
--  MacOSX:Users:ThreePigs.txt

set InputFile to open for access StoryFile
log InputFile
--  276  (each run will produce a different number)

set EntireStory to read InputFile as string

close access InputFile
display dialog EntireStory
-----
set EntireStory to read StoryFile

display dialog EntireStory

_______________

Does it compile?

Does it run?

Does it display two dialogs with the correct information?

In the script you posted, the line

set InputFile to open for access file StoryFile


 wouldn't compile OMM, so I removed "file" and it worked.

In general, open for access command is not needed for simply reading an
entire file. You would use that if you're reading a file a point, doing
something else, then coming back to the file to read some more.

HTH,

ES


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >Re: open for access file (From: Michelle Steiner <email@hidden>)

  • Prev by Date: Re: open for access file
  • Next by Date: Re: open for access file
  • Previous by thread: Re: open for access file
  • Next by thread: Re: AppleScript-Users Digest, Vol 6, Issue 324
  • Index(es):
    • Date
    • Thread