Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

If/ElseIf/Else

$
0
0

Greetings:

 

I am asking a best practices question.  I am scripting to check on a variety of vendor (Envisionware) product versions.  The script will query XP, possibly XP x-64, Win7 both 32 and 64 bit systems.  My question is this:  Since I know that some systems have both  \Program Files (x86)\Envisionware\  and  \Program Files\Envisionware\  folders, do I need to allow for a "dummy" variable ($x) in an Else statement.  Is there a more elegant way?  See my code below.  By the way, forgive me if I forgot the code tags and make ugly code display, and thanks for your help. 

 

Ya'll (yes, I'm from GA and AL mostly) are very amusing, dealing with dogs who think they can post trash on your site without consequences.  I really like your explanations of why someone gets banned, etc.  It's not like I haven't been inadvertently rude, but it's nice to see the "entitled generation" get their dues.

<autoit>

 

dim $x = 0

If FileExists ("C:\Program Files\" & "Envisionware\" ...) Then
  $x86 = FileGetVersion ("C:\Program Files\" & "Envisionware\" ...)
ElseIf FileExists ("C:\Program Files (x86)\" & "Envisionware\" ...) Then
  $x64 = FileGetVersion ("C:\Program Files (x86)\" & "Envisionware\" ...)
Else $x = 0
EndIf

 

</autoit>

 

|Ah, it looks like I need a reminder on posting code...


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>