Jump to content
Sign in to follow this  
dropoff510

Need Help with If statements

Recommended Posts

dropoff510

I'm trying to create a code that well scan each letter of some text and return if it is a number.

This is what I have so far,

Send("^c")

$char = ClipGet()

$code = Asc($char)

If $code = 48-57 Then

$charType = 2

;That character is a number

I know that the above code namely the "48-57" Doesn't work

So my question. Is their any way to make it so that i don't have to make 10 If statements for all the numbers to tell me that a character is a number?

Share this post


Link to post
Share on other sites
muhmuuh

If $code>=48 AND $code<=57 Then...

And check the help file. Everything is very well explained with examples. Also there are some usefull functions that you can use like IsNumber()


I ran. I ran until my muscles burned and my veins pumped battery acid. Then I ran some more.

Share this post


Link to post
Share on other sites
dropoff510

Thank You, that's exactly what i needed.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×