Open for Access, Alias, Items in use
Open for Access, Alias, Items in use
- Subject: Open for Access, Alias, Items in use
- From: email@hidden
- Date: Wed, 30 Jan 2002 16:14:03 -0600
I am running Applescript 1.7 on my test machine. On Apple's website it looks
like Applescript 1.8 is an OS X only release. Is that true? I have been
unable to locate an OS 9 installer for anything higher than AS 1.7.
Jim Scharosch
Mac System Administrator
Gazette Communications
319-368-8669
email@hidden
>
----------
>
From: John S. Baltutis
>
Sent: Wednesday, January 30, 2002 3:31 PM
>
To: email@hidden
>
Subject: Re: applescript-users digest, Open for Access, Alias, Items
>
in use
>
>
You wrote:
>
>
> From: email@hidden
>
> To: email@hidden
>
> Subject: Open for Access, Alias, Items in use
>
> Date: Wed, 30 Jan 2002 13:51:27 -0600
>
>
>
> I have a script posted below. When I try to run it in OS 9.2.2, I get
>
the
>
> error message:
>
> "The command could not be completed, because it contains items that are
>
in
>
> use."
>
>
>
> It runs fine in OS 9.1.
>
>
>
> Any ideas what broke it, or what I can do to get around this problem?
>
>
>
> set theText to "blah, blah, blah."
>
> set TheFile to open for access file {{path to desktop, "testfile"} as
>
string}
>
> with write permission
>
> write theText to TheFile
>
> close access TheFile
>
>
>
> tell application "Finder"
>
> select file "testfile"
>
> make new alias file to selection at desktop
>
> end tell
>
>
>
Works for me when I fix the lines:
>
"set TheFile to open for access file {{path to desktop, "testfile"} as
>
string}
>
with write permission" (broken in the digest)
>
>
to read:
>
>
"set TheFile to open for access file {{path to desktop, "testfile"}
>
as string} with write permission" NO BREAKS
>
>
If there's an alias already present, it just makes another appending a 1
>
to it.
>
>
9.2.2 running AS 1.8.2b1 on a G4 450 MP.