Re: open for access file
Re: open for access file
- Subject: Re: open for access file
- From: Mike Lally <email@hidden>
- Date: Thu, 16 Jul 2009 16:31:14 +0100
Hi Michelle,
This is a copy of a script copied precisely from Ford's book . . .
set StoryFile to (path to users folder as string) & "ThreePigs.txt"
set InputFile to open for access file StoryFile
set EntireStory to read InputFile as string
close access InputFile
display dialog EntireStory
On execution the error message 'Network file permission error' appeared,
with the 'open for access file StoryFile' section highlighted.
James supplied me with alternate code to do the job of opening the little pigs
story and that worked flawlessly. So, I've got a way round the problem, I'm still
curious as to the nature of the error however, it sounds like its a security thing.
Anyway, thank you for your interest and input!
Mike
On Thursday, 16 July, 2009, at 04:04PM, "Michelle Steiner" <email@hidden> wrote:
>On Jul 16, 2009, at 5:44 AM, James Bensley quoted Mike:
>
>> the Author's code was as follows . . .
>> set MyFile to "Macintosh HD:Users:Jerry:Documents:GroceryList.txt"
>> I made the same setting but replaced 'Jerry' with my home folder and
>> used a differently named text file.
>
>
>I never received that message from Mike; the following is directed to
>him:
>
>Have you changed the name of your hard disk, or is it still named
>"Macintosh HD"?
>
>a more generic way of doing this is
>set myfile to ((path to documents folder) as text) & "filename"
>
>This will work regardless of the name of the disk or the user's name;
>just change the name of the file to whatever file that's appropriate.
>
>-- Michelle
>
>--
>Windows was always a mystery to me; the biggest mystery being "Why
>does anyone want to use this?"
>
> _______________________________________________
>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
>
>
_______________________________________________
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