FileOpenBox - Multiple File Types/Single Mask (Or PlugIn?) - Forum

Forum Navigation
You need to log in to create posts and topics.

FileOpenBox - Multiple File Types/Single Mask (Or PlugIn?)

I've seen this in other Windows file dialog boxes, how do I do it here?
Let's say I want a FileOpenBox with a file mask that covers multiple image file formats; JPG, PNG, BMP and so on...

FileOpenBox "Select Drawing File" "JPG|*.jpg|PNG|*.png|BMP|*.bmp" "[CurDir]" "[ImageFile]" ""

This works fine but I deliberately have to select which file type from the drop down list at the bottom of the box.

Can I have multiple file types using one mask? I've tried many variations with no success. "JPG/PNG|*.jpg,*.png"
I've tried comma, slash, pipe, space and nothing works.

None of the plugins I have will work either. Should I post this in the plugins section also?

Geez Paul, you might try a semicolon.

That works.

I figured out my own problem. Thanks.

luishp and Vadim have reacted to this post.
luishpVadim

Not to hijack this post, but ... I'm trying to do this exact thing with the FileList command.   How can I get this to work with any of these three file extensions?   It works just fine with one.

FileList "[TheFolder]\*.jpg;*.jpeg;*.png" "Files" "[FileList]"

Seems like it should work...  ;-/

Thanks

FileList "[TheFolder]\*.jpg|*.jpeg|*.png" "Files" "[FileList]"

proforma.guyot and rcohen have reacted to this post.
proforma.guyotrcohen

@rcohen

If all else fails, try ...

- multiple commands (each using a different [variable]
- then merge the results into a single variable

... e.g.

FileList "C:\My Folder\*.jpg" "Files" "[myJPG]"
FileList "C:\My Folder\*.png" "Files" "[myPNG]"
FileList "C:\My Folder\*.gif" "Files" "[myGIF]"

SetVar "[myList]" "[myJPG][#13][myPNG][#13][myGIF]"

... using this technique, you can even combine lists from different folders.

proforma.guyot and rcohen have reacted to this post.
proforma.guyotrcohen

Hi guys,

@iretz, this works but only permits you one at a time.   I'm processing entire folders in one go.

@Gaev, great idea thank you.   Seems though that in the name of consistency that this should work as in other places...

Just wanted to be sure I wasn't overlooking something ...

Thanks again!!

 

Hi @pauljonestindall

 

Did you check NeoDialogs plugin?

Uploaded files:
  • You need to login to have access to uploads.
proforma.guyot and rcohen have reacted to this post.
proforma.guyotrcohen

Hi @iretz,

Zaeem insisted that your idea indeed works, so I tried again.  Turns out that the lines after that one made it appear as if it wasn't working, but that was my error.

Thanks for the tip.  @gaev , your idea was working also.    as I had that going first before Zaeem insisted I was overlooking something ...