Jump to content

Recommended Posts

Posted

Hi to all, i have a new request to autoit guru :mellow:

For example i have 6 variable, this variable contains string. Now i have to check if ALL all variables different from each other. It's very annoying to do that with a huge IF THEN, even if the variable are much more tha 6. There is a simple way to do this?

Hi!

Posted (edited)

Drop your variable(s) data into a array and use that array in a scanning loop.

Something* like this should do the trick. (*Process)

$fFailed = False
For $iSearchFor = $iFirst To $iLast-1
For $iCompare = $iSearchFor+1 To $iLast
  if $aArray[$iSearchFor] == $aArray[$iCompare] then $fFailed = True
  ;; '==' is string enforced + case sensitive compare.
Next
Next
Edited by iEvKI3gv9Wrkd41u

"Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions."
"The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014)

"Believing what you know ain't so" ...

Knock Knock ...
 

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
  • Recently Browsing   0 members

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