Opening a PDF
kray at sonsothunder.com
Mon Dec 31 12:56:01 EST 2001
On Windows, you can use the shell() command, like this:
set the hideConsoleWindows to true
On a Mac, you can use AppleScript to do it:
tell application "Finder"
open file "My Hard Disk:mypdf.pdf"
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
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/
----- Original Message -----
From: "Dan Friedman" <dan at clearvisiontech.com>
To: <use-revolution at lists.runrev.com>
Sent: Monday, December 31, 2001 10:09 AM
Subject: Opening a PDF
> I'm sure this topic has already been dealt with before (I can't be the
> one who wanted to do this), but, does anyone know a way to open a pdf file
> without knowing the path to Acrobat? (I need to do this on both Mac and
> As far as I know, the only way to do this is:
> launch "/HardDrive/aFolder/mypdf.pdf" with <Acrobat>
> But, you have to know the path to <Acrobat>.
> If you know how to do this, I would love it if you can provide a code
> snippet. Also, how do you know if it was successful? I would like to
> present a dialog to the user if Acrobat isn't installed.
> Thank you in advance for your time,
> Dan Friedman
> ClearVision Technologies, Inc.
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the Use-livecode