Author Topic: How Do I make a Password in a VBS Script?  (Read 2868 times)





If it helps, here's some psudo code in somewhat C style (In C you would actually need to do it with character arrays, but w/e). I don't know the syntax of VB, but it may help.

Code: (psudo code) [Select]
int main(){
    var password;

    printf("Please enter your password: ");
    scanf(password);

    if(password == "thistopicisgayjustlikemakingblah")
        printf("Password correct!");
    else
        printf("Password incorrect");
    
    getchar();
    return 0;
}

Learn C.
This. C is probably the best thing to program in.
« Last Edit: April 11, 2010, 11:17:58 PM by Radial543 »

Let me be a little more specific. Lets say I make an Inputbox appear. If I were to write something like Lol in, while Lol being the right letters. It would display an Msgbox saying Correct, but If I entered some thing like...Rofl it would say Incorrect. How can I make this be done?

Like this:

 box=inputbox ("Please enter the correct letters here.")

If box=Lol Then
a=msgbox ("Correct!")

End If

If box Is Not Lol Then
b=msgbox ("Incorrect")

End If


I want the red parts corrected with the right functions please.



« Last Edit: April 11, 2010, 11:50:36 PM by steve5451 »

Bump >:D >:)

HALP MEH!

There's no command for it, just syntax.

The inputbox() function returns a string, therefore, you need to check for a string.

Code: [Select]
If box="Lol" Then
msgbox ("Correct!")

Else
msgbox ("Incorrect")

End If


I think your first step should be to learn the basics of programming logic before you go any further. The if structure is the most basic and you don't understand how to even use that.


There's no command for it, just syntax.

The inputbox() function returns a string, therefore, you need to check for a string.

Code: [Select]
If box="Lol" Then
msgbox ("Correct!")

Else
msgbox ("Incorrect")

End If


I think your first step should be to learn the basics of programming logic before you go any further. The if structure is the most basic and you don't understand how to even use that.

Thank you.