Jump to content

compare character string


rimba
 Share

Recommended Posts

  • Moderators

could you send me an example of character compare or matching?

regards

Open your help file and look for these bolded function names in the index of your help file (will have their own examples other than below):

$var1 =StringLeft("var or string here", 3)

$var2 = StringLeft("var or string here", 3)

MsgBox(64, "Info", "String is equal = " & (StringCompare($var1, $var2) == 0))

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

regards

:mellow:

I don't know what kind of comparisons you're trying to do, but StringCompare() really should be used if you're trying to find out which string is greater/lesser than the other.

If you're just trying to compare ABC to abc and you want it case sensitive: $var1 == $var2 would suffice, if you didn't want it case sensitive, $var1 = $var2 would do the trick as well (With StringLeft("string", 3) as as the var values).

Might save yourself some time and look up Operators in the help file as well :( ...

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

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...