Jump to content

Quick Question...


Recommended Posts

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]

Link to comment
Share on other sites

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
Link to comment
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]

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...