Jump to content
Sign in to follow this  
BoonPek

'If' Statement and Case Sensitivity

Recommended Posts

BoonPek

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
jvanegmond

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
BoonPek

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.