keen Posted August 11, 2006 Share Posted August 11, 2006 Well im making a application that required a username and password. How can i make it starr our what you are typing in the input box? [center]Kesne's Bar & Grill[/center] Link to comment Share on other sites More sharing options...
BPBNA Posted August 11, 2006 Share Posted August 11, 2006 Try reading the help file. Its all in there. Link to comment Share on other sites More sharing options...
keen Posted August 11, 2006 Author Share Posted August 11, 2006 Well theres a million things there. Can you tell me where please? [center]Kesne's Bar & Grill[/center] Link to comment Share on other sites More sharing options...
BPBNA Posted August 11, 2006 Share Posted August 11, 2006 (edited) Do a help file search.... its pretty self explanatory... you want an inputbox, try looking that up. Edit: BTW, if you haven't looked through the help file then thats usually what you will be told to do. Make an attempt at your script and if you run into problems that you cant figure out, feel free to make a post. Edited August 11, 2006 by BPBNA Link to comment Share on other sites More sharing options...
MHz Posted August 11, 2006 Share Posted August 11, 2006 Welcome, Try this example ; Get the name $name = InputBox("Question", "What is your name?", "") ; Get the password $password = InputBox("Question", "What is your password?", "") MsgBox(0, 'Answer', $name & " " & $password) Link to comment Share on other sites More sharing options...
Cyberworld Posted August 11, 2006 Share Posted August 11, 2006 And if you want a masked password change $password line like this: $password = InputBox("Question", "What is your password?", "","*") Link to comment Share on other sites More sharing options...
keen Posted August 11, 2006 Author Share Posted August 11, 2006 How can I make it so yo need the correct username and password? [center]Kesne's Bar & Grill[/center] Link to comment Share on other sites More sharing options...
BPBNA Posted August 11, 2006 Share Posted August 11, 2006 (edited) You could put it inside a while loop and have it compare the string they enter the password and only exit the loop when its correct. While $pass <> "mypassword" $pass = InputBox("Password", "Enter your password", "" , "*M") WEnd The * makes it so every keystroke comes out as * instead of the real character and the M as the second character of that parameter makes entering something into the box mandatory so they cannot enter a blank(you can just remove the M if you want them to be able to) Edited August 11, 2006 by BPBNA Link to comment Share on other sites More sharing options...
MHz Posted August 11, 2006 Share Posted August 11, 2006 Most get 3 tries so this code will do that for you For $i = 1 To 3 ; Get the name $name = InputBox("Question count:" & $i, "What is your name?", "") If $name <> 'John' Then ContinueLoop ; Get the password $password = InputBox("Question count:" & $i, "What is your password?", "") If $password = 'JibbaJabba' Then ExitLoop Next If $i > 3 Then MsgBox(0, 'You failed', 'Goodbye') Exit 1 EndIf Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now