Using InputBox- Numbers only- Help?

Thursday, September 28, 2006 by sViz | Discussion: DesktopX

Need a little help here. I'm using an input box. I only want a numerical input. No letters. How do I make sure it only accepts numbers? Is this possible?

Here's the script:

Sub object_onscriptenter
object.Text= object.PersistStorage("newtext")
End Sub

Sub Object_OnLbuttonup(x,y,dragged)
Dim Input
If Not dragged Then
Input = InputBox("Enter seconds 1-5")
If Input < 6 Then
If Input > 0 Then
object.PersistStorage("newtext")= Input
Object.Text= object.PersistStorage("newtext")
End If
End If
End If

End Sub


Thanks.
SirSmiley
Reply #1 Tuesday, October 3, 2006 12:01 PM
Look for DX Textbox object by Thomas Thomassen. Get the second version as (I believe) he has an option for numeric only in the script. Sorry can't be of more help at the moment. Still fixing my registry.

Edit: Oops! Saw you've got your answer in the other forum. Sorry 'bout that.
ZubaZ
Reply #2 Tuesday, October 3, 2006 12:16 PM
I was so confused . . . I *KNEW* I had read this before.   
sViz
Reply #3 Wednesday, October 4, 2006 1:26 PM
I was so confused . . . I *KNEW* I had read this before.


LOL! Sorry for the confusion. Whenever I have an odd question I usually like to post on both forums. It covers more ground and gets better results.
thomassen
Reply #4 Wednesday, October 4, 2006 4:17 PM

You had me there as well, I saw teh starting post was teh same, but the follow ups where completely different. Rattled my fragile mind.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01