# filenamebox

Open a dialog can be selected a file. (version 4.54 or later)

    filenamebox <title> [<dialogtype> [<initialdir>]]

## Parameters

string <title>
  The title of dialog box
integer <dialogtype> (optional default=zero) (version 4.65 or later)
  Specifies the type of dialog box.
  If this parameter is zero, creates [Open] dialog box.
  If this parameter is nonzero, creates [Save] dialog box.
string <initialdir> (optional default="") (version 4.85 or later)
  The initial directory of the dialog box can be specified.
  When the empty string and the invalid path are specified, the initial directory will be automatically selected by using the Windows specification(lpstrInitialDir member of OPENFILENAME structure).

## Return Value

System variable <result> (version 4.65 or later)
  If the user specifies a file name and clicks OK button, set to nonzero. The file name is stored in "inputstr."
  If the user cancels or closes the dialog, set to zero.
System variable <inputstr>
  The file name entered by the user

## Example

    connect '/C=11'
    filenamebox 'File selection' 0
    if result<>0 then
    	messagebox inputstr 'title' 0
    	sendfile inputstr 1
    endif