• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Script running the wrong application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Prev by Date: processing time & stack overflow
  • Next by Date: Re: MacOS 9.2.1 disappointment
  • Previous by thread: Re: Script running the wrong application
  • Next by thread: Re: Script running the wrong application
  • Index(es):
    • Date
    • Thread