ispassword
パスワードが設定されているかを判別する。
形式
ispassword <filename> <password name>
パラメータ
- 文字列 <filename>
- パスワードファイル名
- 文字列 <password name>
- パスワード識別子
返り値
- システム変数 <result>
- パスワードファイルに <password name> に対応するパスワードが設定されているならば、1 が格納される。
それ以外の場合、0 が格納される。
解説
パスワードファイル <filename> から <password name> で指定されるパスワードが存在するかを調べる。
例
strdim pw 2 username = 'foo' ispassword 'password.dat' username ; result: 0=false; 1=true if result = 1 then getpassword 'password.dat' username pw[0] 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] setpassword 'password.dat' username pw[0] endif