2
votes

For some reason, I can not get an autohotkey string comparison to work in the script I need it in, but it is working in a test script.

Tester

password = asdf

^!=::
InputBox,input,Enter Phrase,Enter Phrase,,,,,,,30,
if ( input == password ){
    MsgBox, How original your left home row fingers are
    Return
} else {
    MsgBox, You entered "%input%"
    Return  
}

Main

password = password

!^=::
InputBox,input,Enter Password,Enter Password,HIDE,,,,,,30,
if ( input == password ){
    MsgBox,"That is correct sir"
    ;Run,C:\Copy\Registry\disable.bat
    return
}else{
    MsgBox,That is not correct sir you said %input%
    Return
}

Main keeps giving me the invalid. Any ideas?

1
Your main script seems to work fine for me, when i enter "password" in the input box i get "That is correct sir. so im unsure whare the problem you have comes from!blackholyman

1 Answers

2
votes

Your "main" script works just fine.

The == comparitor is case sensitive, you know.