bratton Posted April 22, 2011 Share Posted April 22, 2011 (edited) Hello, Need some help figuring out how to compare variables. Here's my example of a comparison that works: $var = "1.2.3" $var1 = "1.2.4" if $var < $var1 then msgbox (0,"", "True") The problem is, I need the operator to be a variable as well. I've been trying to use Exeucte(), but the problem is that it fails if there is more than one decimal in the string. For example: $var = "1.2.3" $var1 = "1.2.4" $operator = "<" $return = Execute ($var & $operator & $var1) msgbox (0,"", $return) Edited April 22, 2011 by bratton Link to comment Share on other sites More sharing options...
Developers Jos Posted April 22, 2011 Developers Share Posted April 22, 2011 Have you seen _VersionCompare() in the helpfile? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
bratton Posted April 22, 2011 Author Share Posted April 22, 2011 No Jos, No, I had not seen that. Looks promising though. I'll give it a shot. Thanks for the reply. Link to comment Share on other sites More sharing options...
mitsos Posted May 27, 2011 Share Posted May 27, 2011 Thanks from me too... I was just looking for a "version comparison". Link to comment Share on other sites More sharing options...
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