Sign in to follow this  
Followers 0
Info

InputBox

12 posts in this topic

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.

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by JamesB

Share this post


Link to post
Share on other sites

#5 ·  Posted (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 by Info

Share this post


Link to post
Share on other sites

So how do I make it?

Share this post


Link to post
Share on other sites

#8 ·  Posted (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 by JamesB

Share this post


Link to post
Share on other sites

Not working, still opening the InputBox every time I run it. =/

Share this post


Link to post
Share on other sites

Oh, you edited it :)

It's working now, thanks :)

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  
Followers 0