ispassword2
パスワードが設定されているかを判別する。
形式
ispassword2 <filename> <password name>
パラメータ
- 文字列 <filename>
- パスワードファイル名
- 文字列 <password name>
- パスワード識別子
返り値
- システム変数 <result>
- パスワードファイルに <password name> に対応するパスワードが設定されているならば、1 が格納される。
それ以外の場合、0 が格納される。
解説
setpassword2 又は getpassword2 コマンドで作成されたパスワードファイル <filename> に <password name> で識別されるパスワードが存在するかを調べる。
例
strdim pw 2 username = 'foo' encryptstr = 'Sesame!' ispassword2 'password2.dat' username ; result: 0=false; 1=true if result = 1 then getpassword2 'password2.dat' username pw[0] encryptstr pw[1] = pw[0] else msg = 'What is your password for ' strconcat msg username strconcat msg '?' passwordbox msg 'Enter your password' pw[0] = inputstr pw[1] = pw[0] setpassword2 'password2.dat' username pw[0] encryptstr endif