Re: What happened to "file"?
Re: What happened to "file"?
- Subject: Re: What happened to "file"?
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 07 May 2002 06:47:14 -0700
On 5/7/02 2:00 AM, "David Hood" <email@hidden> wrote:
>
On Sunday, May 5, 2002, at 11:44 AM, Paul Berkowitz wrote:
>
>
> OS 10.1.4, AS 1.8.2b3
>
> I thought that file references were supposed to behave just as they
>
> always
>
> did, even though they're actually set up differently "under the hood"
>
> in OS
>
> 10.1.x?
>
> Get a valid path to a real file on your computer, e.g.
>
> "OS X HD:Users:yourname:Desktop:test"
>
> Now try
>
> set f to file "OS X HD:Users:yourname:Desktop:test"
>
> --> ERROR: Can't get file "OS X HD:Users:yourname:Desktop:test"
>
>
This worked fine for me (for a file 2.txt on my desktop):
>
tell application "Finder"
>
set f to file "OSX:Users:david:Desktop:2.txt"
>
return f
>
end tell
>
>
which returned:
>
document file "2.txt" of folder "Desktop" of folder "david" of folder
>
"Users" of startup disk of application "Finder"
>
>
also running
>
OS 10.1.4, AS 1.8.2b3
>
>
so I'm not sure what's going on in your case.
What's going on is that we're talking abut two completely different things.
you are using the Finder's file element (defined by the Finder in a Finder
tell block) whereas I was talking about why AppleScript's own file reference
is broken in OS 10.1.4, AS 1.8.2b3. i know it can be confusing, but these
are two different things. (Actually, the Finder's 'file' is changed too: it
refers to everything as a 'document file' and refuse to acknowledge that
application files are 'application file' type.)
Try the same thing but without the Finder tell block:
file "OSX:Users:david:Desktop:2.txt"
Then try it on an older OS, using a correct file path that works with
'alias', of course.
I'm somewhat surprised that no else has responded to my report on this. I
can't find mention of it in any release notes.
--
Paul Berkowitz
_______________________________________________
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.