setpassword

Adds or Overwrites a password. (version 4.75 or later)

Format

setpassword <filename> <password name> <strval>

Remarks

A password identified by <password name> from the password file <filename> is updated.
The string <strval> 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