Sign in to follow this  
Followers 0
Sardith

Quick Question...

5 posts in this topic

If $Var2 = PEC5RUM3NAS4BAN67945 or LUM3TUW5GEG3FEX62582 or LUT2MAR4GEG7XEJ45246 or JYM3SYW2WEM2FEP72854 or NAJ9BAG6FYR5DUD46682 or JAL5LAM2SAM9FAG87635 then

Would that work or would there be a better way to check $Var2 against mutilply things?


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If $Var2 = PEC5RUM3NAS4BAN67945 or $var2 = LUM3TUW5GEG3FEX62582 or $var2 = LUT2MAR4GEG7XEJ45246 or $var2 = JYM3SYW2WEM2FEP72854 or $var2 = NAJ9BAG6FYR5DUD46682 or $var2 = JAL5LAM2SAM9FAG87635 then

will work

Edited by Manadar

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

If you have lots of values, this would be better...

#include <Array.au3>
$Array = _ArrayCreate("PEC5RUM3NAS4BAN67945","LUM3TUW5GEG3FEX62582","LUT2MAR4GEG7XEJ45246","JYM3SYW2WEM2FEP72854","NAJ9BAG6FYR5DUD46682","JAL5LAM2SAM9FAG87635")
$var2 = "JYM3SYW2WEM2FEP72854"
$search = _ArraySearch ($Array, $var2)
if $search <> -1 then
msgbox(0, "", "Value found!")
else
msgbox(0, "", "Value Not found!")
endif

Hope that helps you. :)

Edited by spyrorocks

Share this post


Link to post
Share on other sites

Thanks alot, I have alot of values.


[font="Verdana"]Valik:Get it straight - I'm not here to say please, I'm here to help - if my help's not appreciated then lotsa luck, gentlemen.[/font]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0