Browse Subversion Repository
Contents of /trunk/doc/en/html/macro/command/getpassword.html
Parent Directory
| Revision Log
Revision 6409 -
( show annotations)
( download)
( as text)
Thu Jun 23 02:01:47 2016 UTC
(7 years, 11 months ago)
by doda
File MIME type: text/html
File size: 1932 byte(s)
htmlの調整
・ <, &, > を文字実体参照に置き換え
・ See also/Reference を See also に統一
・ 参照項目を <ul> によるリストに統一
・ 改行がおかしくなっていた部分(CRのみ)があったのを修正
・ その他タグを一部調整
| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" |
| 2 |
"http://www.w3.org/TR/html4/strict.dtd"> |
| 3 |
<html> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
| 6 |
<title>getpassword</title> |
| 7 |
<meta http-equiv="Content-Style-Type" content="text/css"> |
| 8 |
<link rel="stylesheet" href="../../style.css" type="text/css"> |
| 9 |
</head> |
| 10 |
|
| 11 |
<body> |
| 12 |
|
| 13 |
|
| 14 |
<h1>getpassword</h1> |
| 15 |
|
| 16 |
<p> |
| 17 |
Reads a password. |
| 18 |
</p> |
| 19 |
|
| 20 |
<h2>Format</h2> |
| 21 |
|
| 22 |
<pre class="macro-syntax"> |
| 23 |
getpassword <filename> <password name> <strvar> |
| 24 |
</pre> |
| 25 |
|
| 26 |
<h2>Remarks</h2> |
| 27 |
|
| 28 |
<p> |
| 29 |
Retrieves an encrypted password identified by <password name> from the password file <filename>.<br> |
| 30 |
Decrypts the password and stores it into the string variable <strvar>. |
| 31 |
</p> |
| 32 |
|
| 33 |
<p> |
| 34 |
If the specified file does not exist, it is newly created.<br> |
| 35 |
If the specified password is not stored in the file, the password dialog box appears and the entered password is stored in <strvar>.<br> |
| 36 |
At the same time, the new password is encrypted and written in the file with the identifier <password name>. |
| 37 |
</p> |
| 38 |
|
| 39 |
<p> |
| 40 |
A password file can contain multiple passwords.<br> |
| 41 |
Each of them is identified by the password identifier. |
| 42 |
</p> |
| 43 |
|
| 44 |
<p> |
| 45 |
<em>(version 4.71 or later)</em><br> |
| 46 |
When the password file can not be written, the system variable "result" is set to 0. Otherwise, "result" is set to 1. |
| 47 |
</p> |
| 48 |
|
| 49 |
<h2>Example</h2> |
| 50 |
|
| 51 |
<pre class="macro-example"> |
| 52 |
<strong>getpassword</strong> 'password.dat' 'mypassword' password |
| 53 |
connect 'myhost' |
| 54 |
wait 'login:' |
| 55 |
sendln 'myname' |
| 56 |
wait 'password:' |
| 57 |
sendln password |
| 58 |
</pre> |
| 59 |
|
| 60 |
<pre class="macro-example"> |
| 61 |
expandenv str "%USERPROFILE%\myfile.dat" |
| 62 |
<strong>getpassword</strong> str 'mypassword' password |
| 63 |
if !result then |
| 64 |
messagebox 'Password was not saved' 'ERROR' |
| 65 |
endif |
| 66 |
</pre> |
| 67 |
|
| 68 |
<h2>See also</h2> |
| 69 |
<ul> |
| 70 |
<li><a href="expandenv.html">expandenv</a></li> |
| 71 |
</ul> |
| 72 |
|
| 73 |
</BODY> |
| 74 |
</HTML> |
|