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

IF Statement with Or not working

$
0
0
Hey, I've been trying to figure out how to code this and for some reason I just can't figure out the best way or get it to work.

What I have are 10 different regions, 3 of which are French.  So what i wanted to do is just say if this variable equals any of these three regions then do this otherwise do this and it's not working.  If someone has any ideas on a better way to do it or how to fix it, I would appreciate it!  It seems to be getting hung up on the Or statements because if i just use one it works fine?  With the example below I always get the msgbox "French"... and it should be English?

$Region = "EDM"

IF $Region = "MTL" Or "QBC" Or "LVL" Then
MsgBox(0, "", "French")
Else
MsgBox(0, "", "English")
EndIf


Viewing all articles
Browse latest Browse all 12506

Trending Articles



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