Miguel Posted March 9, 2008 Share Posted March 9, 2008 here is my code:$sText = "<td id=l4 title=125>23930/320000</td>" & @CRLF & _ "<td id=l3 title=100>38279/320000</td>" & @CRLF & _ "<td id=l2 title=100>98610/320000</td><td>" & @CRLF & _ "<td id=l1 title=-9917>161353/245000</td>" $as_Matches = StringRegExp($sText,'id=.1 title=[-]*\d*>(\d*)',3) ; retrieves de value 161353 (as a string)if $as_Matches > 100000 thenMsgBox(0, "Result", "Ok")EndIfMy problem is the comparison of a String with a number......How can i compare a String with a number ?help me, please Link to comment Share on other sites More sharing options...
Xand3r Posted March 9, 2008 Share Posted March 9, 2008 autoit should have no problem converting the string to an integer... i know i did that more than once... and it worked fine Only two things are infinite, the universe and human stupidity, and i'm not sure about the former -Alber EinsteinPractice makes perfect! but nobody's perfect so why practice at all?http://forum.ambrozie.ro Link to comment Share on other sites More sharing options...
Achilles Posted March 9, 2008 Share Posted March 9, 2008 If Number("123") = 123 then Msgbox(0, 'Yay', 'It worked') EndIf My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Miguel Posted March 9, 2008 Author Share Posted March 9, 2008 Ok My problem is that the value that i need to convert to a number the variable $as_Matches If Number($as_Matches) = 161353 then Msgbox(0, 'Yay', 'It worked') EndIf I have tried this and it didn´t work. Link to comment Share on other sites More sharing options...
Xenobiologist Posted March 9, 2008 Share Posted March 9, 2008 Hi, you get an array back!!! You need to compare $as_Matches[0] Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
Miguel Posted March 9, 2008 Author Share Posted March 9, 2008 Thanks Mega, It was so simple... 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