Reads a password.
getpassword <filename> <password name> <password var>
Retrieves an encrypted password identified by <password name> from the password file <filename>.
Decrypts the password and stores it into the string variable <strvar>.
If the specified file does not exist, it is newly created.
If the specified password is not stored in the file, the password dialog box appears and the entered password is stored in <strvar>.
At the same time, the new password is encrypted and written in the file with the identifier <password name>.
A password file can contain multiple passwords.
Each of them is identified by the password identifier.
getpassword 'password.dat' 'foo' password connect 'myhost' wait 'login:' sendln 'myname' wait 'password:' sendln password
expandenv str "%USERPROFILE%\password.dat" getpassword str 'foo' password if !result then messagebox 'Password was not saved' 'ERROR' endif