Sign in to follow this  
Followers 0
erik7426

Help with FileOpenDialog

5 posts in this topic

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

Share this post


Link to post
Share on other sites



I dont get any error

Share this post


Link to post
Share on other sites

working fine for me too


♡♡♡

.

eMyvnE

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

Something else I noticed...now that I am not getting the error it is not putting all of the items in the filter in the list. The dropdown only contains 7 items and I have 11 items in my code. Any ideas?

Share this post


Link to post
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
Sign in to follow this  
Followers 0