setpassword

Adds or Overwrites a password.

Format

setpassword <filename> <password name> <strvar>

Remarks

A password identified by <password name> from the password file <filename> is updated.
The string variable <strvar> 's password is encrypted and stored into the file.

If the specified file does not exist, it is newly created.

A password file can contain multiple passwords.
Each of them is identified by the password identifier.

When the password file can not be written, the system variable "result" is set to 0. Otherwise, "result" is set to 1.

Example

newpasswd = 'hoge'
setpassword 'password.dat' 'yutaka' newpasswd
if result then
  messagebox 'Password updated successfully.' 'Result'
endif

See also