Open-File-Dialog
Command Description
Pop up an open file dialog box
Command Prototype
sRet = Dialog.OpenFile(sDefaultPath,sFilter,sTitle)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
sDefaultPath | True | path | '''C:\Users''' | Locate to default directory when dialog displays. Locate to the directory of last operation if null |
sFilter | True | string | "Text Documents (*.txt) | *.txt |
sTitle | True | string | "Laiye RPA" | Dialog title |
return
sRet,The variable used to save the output of the command.
Demo
Dim sRet
sRet = Dialog.OpenFile('''C:\Users''',"Text document (txt, log)|*.txt;*.log|Any file|*","This is the dialog title" )
TracePrint (sRet)
/**
The output result is the file path selected by the user to open
For example:
sRet = "C: \ uibot \ test_5.6.0 \ log \ 20220125181620.log"
*/