Jump to content

Help with FileOpenDialog


erik7426
 Share

Recommended Posts

I am getting an "Invalid file filter given" error when running this code. Is there a limit to the amount of items you can put in the filter???

$Filter = "Supported Image Types (*.b5t;*.b6t;*.bwt;*.ccd;*.cdi;*.cue;*.iso;*.mds;*.nrg;*.pdi;*.isz)|BlindWrite-Read Images (*.b5t;*.b6t;*.bwt)|CloneCD Images (*.ccd)|DiscJuggler Images (*.cdi)|Cue Sheets (*.cue)|Standard ISO Images (*.iso)|Media Descriptor Files (*.mds)|Nero images (*.nrg)|Instant CD-DVD Images (*.pdi)|Compressed ISO Images (*.isz)|All Files (*.*)"
$ISO = FileOpenDialog("Select Image File to Mount", @MyDocumentsDir, $Filter, 3)

If $ISO <> "" Then
    MsgBox(0, "", $ISO)
EndIf
Link to comment
Share on other sites

working fine for me too

OK, that's weird. I slightly modified the script as I posted it.

Here was my post...

$Filter = "Supported Image Types (*.b5t;*.b6t;*.bwt;*.ccd;*.cdi;*.cue;*.iso;*.mds;*.nrg;*.pdi;*.isz)|BlindWrite-Read Images (*.b5t;*.b6t;*.bwt)|CloneCD Images (*.ccd)|DiscJuggler Images (*.cdi)|Cue Sheets (*.cue)|Standard ISO Images (*.iso)|Media Descriptor Files (*.mds)|Nero images (*.nrg)|Instant CD-DVD Images (*.pdi)|Compressed ISO Images (*.isz)|All Files (*.*)"
$ISO = FileOpenDialog("Select Image File to Mount", @MyDocumentsDir, $Filter, 3)

If $ISO <> "" Then
    MsgBox(0, "", $ISO)
EndIf

Here was my actual script

$Filter = "All Supported Image Types (*.b5t;*.b6t;*.bwt;*.ccd;*.cdi;*.cue;*.iso;*.mds;*.nrg;*.pdi;*.isz)|BlindWrite-Read Images (*.b5t;*.b6t;*.bwt)|CloneCD Images (*.ccd)|DiscJuggler Images (*.cdi)|Cue Sheets (*.cue)|Standard ISO Images (*.iso)|Media Descriptor Files (*.mds)|Nero images (*.nrg)|Instant CD-DVD Images (*.pdi)|Compressed ISO Images (*.isz)|All Files (*.*)"
$ISO = FileOpenDialog("Select Image File to Mount", @MyDocumentsDir, $Filter, 3)

If $ISO <> "" Then
    MsgBox(0, "", $ISO)
EndIf

The only difference between the two that I see is that I removed the word "All" from "All Supported Image Types". Everything else is the same. When I run the code without the word "All" it works. If I try to reinsert "All" that is when I get the error. Not a big deal I'll just leave that word out, but why would that cause the error?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...