DoctorSLO Posted June 12, 2009 Posted June 12, 2009 (edited) Hello. $ntime = StringRegExp($text, "» \d+Attack v(\d+) :( \d+) :( \d+) h", 3) If @error = 0 Then $nhours = Number($ntime[0]) MsgBox(0, "", $nhours) $nminutes = Number($ntime[1]) MsgBox(0, "", $nminutes) $nsec = Number($ntime[2]) MsgBox(0, "", $nsec) $attackat = $nhours*60*60*1000 + $nminutes*60*1000 + $nsec*1000 MsgBox(0, "", $attackat) Else ;nothing EndIf The problem is, that the last msgbox (MsgBox(0, "", $attackat)) says number 999999. So I insert more msgboxes. For example I have incoming attack for 30 sec. So the first MsgBox says 0, second says 0 too, and third is 30. Then if u calculate this $attackat you get result 30000. But autoit give me the result 999999. So anyone can help me? Edited June 12, 2009 by DoctorSLO
Inverted Posted June 12, 2009 Posted June 12, 2009 (edited) Works fine here with the values you described : $nhours = 0 MsgBox(0, "", $nhours) $nminutes = 0 MsgBox(0, "", $nminutes) $nsec = 30 MsgBox(0, "", $nsec) $attackat = $nhours*60*60*1000 + $nminutes*60*1000 + $nsec*1000 MsgBox(0, "", $attackat) Last MsgBox shown 30000 Edited June 12, 2009 by Inverted
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