Re: Script running the wrong application
Re: Script running the wrong application
- Subject: Re: Script running the wrong application
- From: Victor Yee <email@hidden>
- Date: Sat, 25 Aug 2001 13:42:02 -0400
On Sat, 25 Aug 2001 10:00:07 -0700, Paul Berkowitz wrote,
>
Once again, I'm sure it's because GC's 'open' command takes a list as its
>
argument.
>
>
alias (something-that's-not-actually-a-list) -- your own attempt
>
>
doesn't open, but
>
>
(something-that's-not-actually-a-list) as alias -- GC's own 'as alias'
>
implementation, defined by its developers
>
>
is probably coerced by GC to
>
>
{(something-that's-not-actually-a-list) as alias}
>
>
and opens.
>
>
?
My thinking was the other way around; that GC defers "as alias" to AS because it doesn't have its own definition, whereas "alias" is defined (although it doesn't seem to take any parameters; perhaps that's the key).
Where "Docs:" is a partition on my computer:
set x to "Docs:"
tell application "GraphicConverter PPC"
alias x
end tell
--> error
set x to "Docs:"
tell application "GraphicConverter PPC"
x as alias
end tell
--> ok
BTW, going back in this thread using the Finder's "as alias list":
set the folderToProcess to choose folder
tell application "Finder"
set the photoList to (the files of the folderToProcess) as alias list
end tell
repeat with photo in the photoList
tell application "GraphicConverter PPC"
open the photo
end tell
end repeat
Results in an error.
But if you add "set photo to contents of photo" into the repeat loop, it works fine. Which would imply a problem of dereferencing variables with that particular structure.
Victor