If you allowed "MultiSelect" in the OpenFileDialog, the user might have chosen more than one file. The first file is always returned by the OpenFileDialog. All additional files are retrieved by GetFileDialogNextFile$ one by one. If there are no more files, the function returns an empty string.
; Include the library #Include "PBDialogs2" First$ = OpenFileDialog("Choose multiple files", "", "All files|*.*", 1, 1) If First$ <> "" Print "You chose the following files:" Print First$ Repeat OtherFile$ = GetFileDialogNextFile$() Print OtherFile$ Until OtherFile$ = "" Else Print "You cancelled the dialog." EndIf ; Display the Screen and wait for the user to press a key Sync WaitKey |
|