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

Basic If...Else...EndIf that make my head spin fast

$
0
0

Ok, I admit this is (very) basic but currently it make my head spin fast :(

 

I have some variable like this (note: i dont want array even with array maybe it will be much simpler and easier, consider it's a flaw from the beginnning of design)

$key1="value1"
$key2="value2"
$key3="value3"
$key4="value4"
$key5="value5"
$key6="value6"

if $key1 = "" then set $condition = false and doesn't need to check other key anymore

if $key1<>"" and FileExists($key1) then $condition = true and pls check another key
if $key2<>"" and FileExists($key2)  then $condition = true and pls check another key, but if $key2<>"" but NOT FileExists($key2) then $condition=false and do not need to check another key anymore.

 

if $key3<>"" and FileExists($key3)  then $condition = true and pls check another key, but if $key3<>"" but NOT FileExists($key3) then $condition=false and do not need to check another key anymore.

 

<do that above until key6>

 

If NOT $condition then

   ...

EndIf

 

Thank you!


Viewing all articles
Browse latest Browse all 12506

Trending Articles



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