Jump to content

Need Help with If statements


Recommended Posts

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?

Link to comment
Share on other sites

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...