At 14:57 -0500 02/15/2002, Brian Lantz wrote:
>i'm using this script to determine if Quicktime and Acrobat are installed.
>It seems to work ok, except for a few cases. Sometimes on Win 2000, it
>seems to think that Acrobat is installed, which it's not. Any suggestions
Well, I'd do it a little differently...
on exitFrame
bNoAcrobat = FALSE
bNoQuickTime = FALSE
sPathToAcrobat = baFindApp( "pdf" )
if sPathToAcrobat = "" then
bNoAcrobat = TRUE
else
nVersion = baFileVersion ( sPathToAcrobat )
if nVersion < 4 then
bNoAcrobat = TRUE
end if
end if
if the quickTimePresent = FALSE or quickTimeVersion() < 4 then
bNoQuickTime = TRUE
end if
if bNoAcrobat = TRUE and bNoQuickTime = TRUE then
go "Install both"
else if bNoAcrobat = TRUE then
go "Install Acrobat"
else if bNoQuickTime = TRUE then
go "Install QuickTime"
else
go "start"
end if
end
But there's something else I think I'd do, and that's allow the user
to determine him/herself whether s/he wants QT or Acrobat installed.
It's not usually a very good idea to try to write code that does
things an intelligent human could do (or even a semi-intelligent
human), since there are often some rather esoteric situations (as you
have found) which can cause such efforts to malfunction.
Perhaps you could give the user a choice? "Do you have Acrobat? If
you don't or if you don't know, click the 'no' button and this
porogram will load the Acrobat installer. Otherwise click 'yes'."
...and the same for QuickTime.
There are other situations that could get you into trouble. Suppose I
have the author version of QT4, but your code was written such that
it would try to install 5 if it thought the version was too low. Or
suppose something similar happened with Acrobat.
As an example BuddyAPOI under Dir851 running in Classic on MacOSX.1
tells me I do not have Acrobat installed, when in fact I have version
5 for OSX. Thus if your app were running on this system it would
constantly try to install Acrobat for me, rather than either giving
me the choice to install it on my own, or move on, or not even ask in
the first place.
It doesn't hurt to ask the user what to do, if you also include
explanations as to what you're asking and why. I think most users
prefer that approach, which implicitly presumes the user is more
intelligent than a can of stewed tomatoes. Most of 'em are. ;)
--
Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://www.osborne.com/indexes/beginners_guides.shtml
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/lingo-l.cgi To post messages to the list, email
[EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for
learning and helping with programming Lingo. Thanks!]