Opening a PDF
gcanyon at inspiredlogic.com
Mon Dec 31 14:00:01 EST 2001
At 11:51 AM -0600 12/31/01, Ken Ray wrote:
>On a Mac, you can use AppleScript to do it:
> tell application "Finder"
> open file "My Hard Disk:mypdf.pdf"
> end tell
>using the "do <script> as applescript" command.
>To find out if Acrobat is installed, you can check (on Windows) the
>following registry key:
>which will give you the path to the currently installed version of Acrobat
>(you'll have to strip out quotes and %1 parameters, but you get the idea).
>I'm not sure of the best way to see if Mac Acrobat is installed other than
>looking where is *should* be. Perhaps there's an AppleScript that can be
You could do this (CARO is the creator code for Acrobat):
set tFileSpec to choose file with prompt "Select a File:"
set tAppPath to ""
tell application "Finder"
set tAppPath to (application file id "CARO" as string)
display dialog "Couldn't find Acrobat."
if tAppPath is not "" then tell application tAppPath to open tFileSpec
More information about the Use-livecode