rimba Posted November 14, 2008 Posted November 14, 2008 howto compare the first three character of string with three character for example ABC. regards
Dampe Posted November 14, 2008 Posted November 14, 2008 Have a look in the help file at StringCompare()
rimba Posted November 14, 2008 Author Posted November 14, 2008 could you send me an example of character compare or matching? regards
Moderators SmOke_N Posted November 14, 2008 Moderators Posted November 14, 2008 could you send me an example of character compare or matching?regardsOpen 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.
Moderators SmOke_N Posted November 14, 2008 Moderators Posted November 14, 2008 regards 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.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now