PantZ4 Posted March 19, 2007 Share Posted March 19, 2007 How to get a whole number? A Integer and not a real. Eg no comma numbers. IsInt can only return True or False but I need the number... Thank You Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted March 19, 2007 Moderators Share Posted March 19, 2007 $sNum = '1,234.56' MsgBox(64, 'Info', _StringReturnInt($sNum)) Func _StringReturnInt($sString) Return Int(StringReplace($sString, ',', '')) EndFunc 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 More sharing options...
PantZ4 Posted March 19, 2007 Author Share Posted March 19, 2007 $sNum = '1,234.56' MsgBox(64, 'Info', _StringReturnInt($sNum)) Func _StringReturnInt($sString) Return Int(StringReplace($sString, ',', '')) EndFunc Thanks Smoke 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