king9072 Posted May 16, 2004 Posted May 16, 2004 Alright, a point in my script comes where I devide a number but it spits out a really ugly number like 8.342342356168543... and it is being inserted into a tooltip, thus it is a mess. What I want to do is have that number rounded, but the round function wont use a variable. I also think I remember seeing something where if you put some symbol infront of a variable, it will be read as a solid number and not as a variable. Thanks in advance for help.
CyberSlug Posted May 16, 2004 Posted May 16, 2004 ; The following works for me with the current version of AutoIt (3.0.101) $number = 8.342342356168543 $rounded = Round($number, 2) ;two-decimal places MsgBox(4096,"Rounded", $rounded) Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
king9072 Posted May 16, 2004 Author Posted May 16, 2004 ; The following works for me with the current version of AutoIt (3.0.101)$number = 8.342342356168543$rounded = Round($number, 2) ;two-decimal placesMsgBox(4096,"Rounded", $rounded)Thanks. I thought I had that the first time, but this works now
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