Re: Script running the wrong application
Re: Script running the wrong application
- Subject: Re: Script running the wrong application
- From: Nigel Garvey <email@hidden>
- Date: Sat, 25 Aug 2001 10:10:58 +0100
Michelle Steiner wrote on Fri, 24 Aug 2001 14:17:49 -0700:
>
I have a folder with JPEG files with a Picture Viewer creator. I have a
>
script that tells Graphic Converter to open the pictures, but Picture
>
Viewer winds up opening them. Anyone know why?
>
>
Here's the code:
>
>
set the folderToProcess to choose folder
>
tell application "Finder"
>
set the photoList to (the files of the folderToProcess)
>
end tell
>
repeat with photo in the photoList
>
tell application "GraphicConverter"
>
open the photo
>
end tell
>
end repeat
(I've read the later posts too.)
Just guessing, but might it be because each item in photoList is a Finder
reference? I've found before that error messages involving Finder objects
- even outside the tell block - begin with "Finder got an error:". Maybe
the Finder's handling the file opening here too. The 'as alias'
work-round would work by cutting the Finder connection.
If this is the case, an alternative approach would be to get the Finder
to return photoList as an alias list.
NG