Info Posted February 20, 2008 Share Posted February 20, 2008 I took a look at the help file, but still did'nt understand how to EXIT or MsgBox if the serial was correct or incorrect in the InputBox... Thanks. Link to comment Share on other sites More sharing options...
James Posted February 20, 2008 Share Posted February 20, 2008 (edited) $Serial = "AutoIt" $Input = InputBox(@scriptname, "Insert code:") Do If $Input = $serial Then MsgBox(0, "Hey!", "Correct!") Exit Else MsgBox(0, "Wrong!", "Wrong!") EndIf Until $Input = $Serial Edited February 20, 2008 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Info Posted February 20, 2008 Author Share Posted February 20, 2008 Thanks. Link to comment Share on other sites More sharing options...
James Posted February 20, 2008 Share Posted February 20, 2008 ok Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Info Posted February 20, 2008 Author Share Posted February 20, 2008 (edited) I need some help again I want it to stop showing the InputBox once the correct pass is entered. So I did something like this: If FileExists ( "C:\Lol.txt") = True Then MsgBox ( 64, "Yay!", ":DDDD") Else $Serial = "AutoIt" $Input = InputBox(@scriptname, "Insert code:") If $Input = $serial Then FileWrite ( "C:\Lol.txt") MsgBox(0, "Hey!", "Correct!") Exit Else MsgBox(0, "Wrong!", "Wrong!") EndIf Endif And it does an error when I run it, why? Edited February 20, 2008 by Info Link to comment Share on other sites More sharing options...
James Posted February 20, 2008 Share Posted February 20, 2008 You need to FileOpen before you can write to it Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Info Posted February 20, 2008 Author Share Posted February 20, 2008 So how do I make it? Link to comment Share on other sites More sharing options...
James Posted February 20, 2008 Share Posted February 20, 2008 (edited) If FileExists("C:\Lol.txt") = True Then MsgBox(64, "Yay!", ":DDDD") Else $Serial = "AutoIt" $Input = InputBox(@ScriptName, "Insert code:") If $Input = $Serial Then $File = FileOpen("C:\Lol.txt", 2) FileWrite($File, "C:\Lol.txt") MsgBox(0, "Hey!", "Correct!") FileClose($File) Exit Else MsgBox(0, "Wrong!", "Wrong!") EndIf EndIf Fixed file write! Edited February 20, 2008 by JamesB Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Info Posted February 20, 2008 Author Share Posted February 20, 2008 Not working, still opening the InputBox every time I run it. =/ Link to comment Share on other sites More sharing options...
James Posted February 20, 2008 Share Posted February 20, 2008 Try again! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Info Posted February 20, 2008 Author Share Posted February 20, 2008 Oh, you edited it It's working now, thanks Link to comment Share on other sites More sharing options...
James Posted February 20, 2008 Share Posted February 20, 2008 glad I helped. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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