NewBe Posted December 30, 2007 Share Posted December 30, 2007 hmm this might be tricky I need an inputbox that only accepts numbers but that is not all $Result = InputBox("Munition" , "what level is your weapon" , "0" , "" , 200 , 50) MsgBox(0 , "Damage" , "Damage " & $Result) ;if the weapon (result) returns 1 all the way up to 6 then nothing happens but if it is a number above 6 such as 7 the result will return like this MsgBox(0 , "Damage" , "Damage " & $Result + 100) ;for example... this only happens when the number is over 6 not sure were to begin with this one my head hurts Link to comment Share on other sites More sharing options...
James Posted December 30, 2007 Share Posted December 30, 2007 The only way I could think of doing this, is by recreating one using GUI functions and using an Inputbox with the $ES_NUMBER so it will only allow numbers Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
xzaz Posted December 30, 2007 Share Posted December 30, 2007 http://www.autoitscript.com/forum/index.php?showtopic=55733And check the $Result with if $result = 1 OR $result = 2 Then ;nothing happens Elseif $result > 6 Then MsgBox(0 , "Damage" , "Damage " & $Result + 100) ;for example... this only happens when the number is over 6 Endif Small Color Picker v0.2 | Travian bot Link to comment Share on other sites More sharing options...
NewBe Posted December 30, 2007 Author Share Posted December 30, 2007 (edited) Omg you guys are gods... I just woke up and couldn't think of a way to do it so far this is working... Global $result $result = InputBox("" , "" , "" , "") If $result = 0 Or 1 OR 2 Or 3 Or 4 Or 5 Or 6 Then MsgBox(0 , "" , "bad") Elseif $result = 6 Then MsgBox(0 , "Damage" , "Damage " & $Result) ;for example... this only happens when the number is over 6 Endif now if only I could find away to eliminate letters and make it 6 all the way up to mmm... unlimted and ill be so Happy I am thinking of a way but if you guys got a plan please share it hmm StringIsDigit Edited December 30, 2007 by NewBe Link to comment Share on other sites More sharing options...
NewBe Posted December 30, 2007 Author Share Posted December 30, 2007 hmm shouldn't this code work exactly correct ;if it isn't a digit exit right away If StringIsDigit($result) = 0 Then MsgBox(0 , "" , "exit") Exit EndIf ;if it isn't a digit exit right away ;if digit - 0-6 then bad If $result = 0 Or 1 OR 2 Or 3 Or 4 Or 5 Or 6 Then MsgBox(0 , "" , "bad") Else ;it must be a digit over 6? MsgBox(0 , "Damage" , "Damage " & $Result + 100) ;for example... this only happens when the number is over 6 Endif Link to comment Share on other sites More sharing options...
James Posted December 30, 2007 Share Posted December 30, 2007 That works, but it could be annyoing when people accidentally type it in. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
NewBe Posted December 30, 2007 Author Share Posted December 30, 2007 (edited) That works, but it could be annyoing when people accidentally type it in.nah it''s not going to exit that way that was for testing only... all it is doing is thisif weapons are over level 6 $weapon ($result) * 0.025%you see weapons at level 0 all the way up to 6 have a set damage but if your weapon is any higher it only gives you 0.025% per point(this is for a game) Edited December 30, 2007 by NewBe Link to comment Share on other sites More sharing options...
James Posted December 30, 2007 Share Posted December 30, 2007 Yeah, I noticed All right, well, have fun and good luck! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
NewBe Posted December 30, 2007 Author Share Posted December 30, 2007 Yeah, I noticed All right, well, have fun and good luck!Thanks to the both of you 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