Saturday, 31 August 2013

VBScript equals problems

VBScript equals problems

I have been working on a vbs login and signup program I have a fully
functional working signup program but I am having troubles seeing if a
inputbox a.k.a the password is equal to the logged password from signup in
a file
uname = inputbox("Please type your Username.")
pword = inputbox("Please ebter your Password.")
Set objFileToRead =
CreateObject("Scripting.FileSystemObject").OpenTextFile(uname +
".txt",1)
strFileText = objFileToRead.ReadLine()
objFileToRead.Close
Set objFileToRead = Nothing
If strFileToRead = pword Then
document.write("Welcome!")
CreateObject("WScript.Shell").Run "forums.htm"
Else
msgbox("Incorrect Username or Password")
Wscript.Quit
End If

No comments:

Post a Comment