InputBox, password, Enter your Password,, HIDE,, 100
Loop, {
if (errorlevel = 1)
return
if (password = "password") {
MsgBox, The password is correct.
return
} else if (password != "password") {
MsgBox, The password is incorrect.
InputBox, password, Enter your Password,, HIDE,, 100
}
}
This will check if the user has typed "password" in the input box. If the user types the correct value, it will say "The password is correct." and close the input box. If the user types the incorrect value, it will say "The password is incorrect." and reopen the input box. If the errorlevel is 1 (the user pressed cancel), it will terminate the script.