Re: Finder scripting: OS 9 vs OS X
Re: Finder scripting: OS 9 vs OS X
- Subject: Re: Finder scripting: OS 9 vs OS X
- From: John Delacour <email@hidden>
- Date: Thu, 15 Aug 2002 17:36:45 +0100
At 11:46 am -0400 15/8/02, Fox, Christopher B wrote:
>
Why does the following script work fine in Mac OS 9.2.2 (AS 1.8.3), but fail
>
in Mac OS X 10.1.5?
>
>
tell application "Finder"
>
set theFiles to every file of (choose folder)
>
repeat with aFile in theFiles
I can't answer definitively because my G4 in in hospital till Monday, but in the short time I've been using OS X I've noticed that the Finder's typing of files has changed and it seems you can't coerce a file reference directly to an alias.
What I have been doing is something along the lines of
...
repeat with f in fList
set f to "" & f -- convert to string
set f to alias f
set fInfo to info for f ...
It might not be exactly that, but if you step through, you will find a sequence of coercions that will work in either environment.
JD
_______________________________________________
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.