Opening files with AppleScript
Opening files with AppleScript
- Subject: Opening files with AppleScript
- From: Beau Hartshorne <email@hidden>
- Date: Fri, 23 Feb 2001 13:32:36 -0800
Hi,
I am creating a Mac CD that uses a Flash executable to call AppleScripts
that open files on the CD. Flash can only open other apps, so I had to
create several AppleScript apps that would open the .pdf and PowerPoint
files that I needed them to. This process works well on computers with
PowerPoint or Acrobat Reader installed on them, but chokes if those programs
are not present. I've installed a version of Acrobat Reader as well as the
PowerPoint viewer on the CD in hopes that if someone opens a .pdf of
PowerPoint file that the Mac will find the proper applications on the CD.
This didn't work.
So I tried to get AppleScript to tell the Mac to use a specific application
to open a specific file. This code:
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
Any ideas!?!?
Thanks,
Beau