Re: Opening files with AppleScript
Re: Opening files with AppleScript
- Subject: Re: Opening files with AppleScript
- From: Emmanuel <email@hidden>
- Date: Fri, 23 Feb 2001 17:19:10 -0500
At 16:32 -0500 23/02/01, Beau Hartshorne wrote:
>
tell application "Finder"
>
activate
>
open file "Events.pdf" of folder "Documents" of disk "CDRom" using
>
application "Acrobat Reader 4.0" of folder "Acrobat Reader 4.0"
>
of folder "Support Applications" of disk "CDRom"
>
end tell
application "Acrobat ..." of folder "..." is not a correct reference for
Finder.
I have found this by testing your script with a cool script editor named
Smile (that my companies makes and which is free).
I think it should work if you changed "application" into "file".
What I do usually is use "alias":
---------------------- not tested
tell application "Finder"
set theDocPath to "CDRom:Documents:Events.pdf"
set theAppPath to "CDRom:Support Applications:Whatever long path"
open (alias theDocPath) using (alias theAppPath)
end
----------------------
Emmanuel