Sign in to follow this  
Followers 0
BoonPek

'If' Statement and Case Sensitivity

3 posts in this topic

Hello Readers of this Topic, ;)

I am wondering if it is possible to make an 'If' Statement non case-sensitive.

$Input = InputBox("Username", "Please enter your Username: ")

If $Input = "User" Then
    MsgBox (48, "Username", "Username Correct!")
Else
    MsgBox (48, "Username", "Username Wrong!")
EndIf

So that when I enter "user" instead of "User" it is still correct?


Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

If statements are not case sensitive by default. If you use == it becomes case sensitive.

If statements are not case sensitive by default, you can use == to make them case sensitive.

P.S. Bye

Edit: Added ambiguity

Edited by Manadar

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

The Code Snippet I put up, when you test it is case sensitive even without the '=='.

Edit: Oops, lol, I made a mistake. I tested it only once and typed "Uesr" instead of "User". Thanks for your help. ;)

Edited by BoonPek

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  
Followers 0