RequestMultiFile

BlitzMax Forums/BlitzMax Programming/RequestMultiFile

grable(Posted 2006) [#1]
Heres a RequestMultiFile() function for those who need it (i got tired of the MaxIDE not having it ;)

WIN32 ONLY!! and you need MinGW to compile the C file.

It is allmost the same code as RequestFile() except it can handle more than 1 file and there is only the OPEN mode.

RequestMultiFile.bmx

RequestMultiFile.c


It returns an array of strings. if there is only 1filename selected, the whole path+filename wil be returned
in index 0.
If there is more than 1 filename selected, the path will be at index 0 and the filenames will be at
index 1 -> N

Usage
Local files:String[] = RequestMultiFile( "Open Files", "All Files (*.*):*;Source Files (*.bmx | *.c | *.h):bmx,c,h")
If files.Length = 1 Then
    ' only 1 filename
ElseIf files.Length > 1 Then
    ' path + several filenames
EndIf



Fabian.(Posted 2006) [#2]
Great! It's really usefull, thanks a lot!!

I think it should become an official BMX module/function.
How do you think?


grable(Posted 2007) [#3]
I lost my original copy of this so i had to find it here ;)

Bumping it because i added it to the code archives and updated it with the latest code from RequestFile() and removed the need for MinGW (in the hopes it can be added to the MaxIDE Community Edition some day)

MAXGUI: Multiple file requester

EDIT: this should probably be moved to the MaxGUI category (it was created before its time hehe)