| 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>filenamebox</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>filenamebox</h1> |
| 15 |
|
| 16 |
<p> |
| 17 |
Open a dialog can be selected a file. <em>(version 4.54 or later)</em> |
| 18 |
</p> |
| 19 |
|
| 20 |
<pre class="macro-syntax"> |
| 21 |
filenamebox <title> [<dialogtype> [<initialdir>]] |
| 22 |
</pre> |
| 23 |
|
| 24 |
<h2>Parameters</h2> |
| 25 |
|
| 26 |
<dl> |
| 27 |
<dt class="macro">string <title></dt> |
| 28 |
<dd>The title of dialog box</dd> |
| 29 |
|
| 30 |
<dt class="macro">integer <dialogtype> (optional default=zero) (version 4.65 or later)</dt> |
| 31 |
<dd>Specifies the type of dialog box.<br> |
| 32 |
If this parameter is zero, creates [Open] dialog box.<br> |
| 33 |
If this parameter is nonzero, creates [Save] dialog box.</dd> |
| 34 |
|
| 35 |
<dt class="macro">string <initialdir> (optional default="") (version 4.85 or later)</dt> |
| 36 |
<dd>The initial directory of the dialog box can be specified.<br> |
| 37 |
When the empty string and the invalid path are specified, the initial directory will be automatically selected |
| 38 |
by using the Windows specification(lpstrInitialDir member of OPENFILENAME structure). |
| 39 |
</dd> |
| 40 |
</dl> |
| 41 |
|
| 42 |
<h2>Return Value</h2> |
| 43 |
|
| 44 |
<dl> |
| 45 |
<dt class="macro">System variable <result> (version 4.65 or later)</dt> |
| 46 |
<dd>If the user specifies a file name and clicks OK button, set to nonzero. The file name is stored in "inputstr."<br> |
| 47 |
If the user cancels or closes the dialog, set to zero.</dd> |
| 48 |
|
| 49 |
<dt class="macro">System variable <inputstr></dt> |
| 50 |
<dd>The file name entered by the user</dd> |
| 51 |
</dl> |
| 52 |
|
| 53 |
<h2>Example</h2> |
| 54 |
|
| 55 |
<pre class="macro-example"> |
| 56 |
connect '/C=11' |
| 57 |
filenamebox 'File selection' 0 |
| 58 |
if result<>0 then |
| 59 |
messagebox inputstr 'title' 0 |
| 60 |
sendfile inputstr 1 |
| 61 |
endif |
| 62 |
</pre> |
| 63 |
|
| 64 |
</body> |
| 65 |
</html> |