Sign in to follow this  
Followers 0
kev51773

inverse filters for FileOpenDialog ?

10 posts in this topic

I need to invoke a FileOpenDialog the display just the contents of a folder whose names dont match a filter.

Anyone have any idea if this is possible?

Share this post


Link to post
Share on other sites



If you mean that it has to show all files... you could use

"All (*.*)"

As filter.. than it`ll show all files/folders.

Neo


[center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center]

Share this post


Link to post
Share on other sites

If you mean that it has to show all files... you could use

"All (*.*)"

As filter.. than it`ll show all files/folders.

Neo

No, what I mean is I have a list of files in a directory as follows

0001.file

0002.file

0003.file

0004.file

00_blah_04.file

0005.file

00_blah_05.file

Basically I want the FileOpenDialog to display the 000*.file files and not the ones with _blah_ in the name.

Share this post


Link to post
Share on other sites

$search = FileFindFirstFile("000*.*")  

If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1
    $file = FileFindNextFile($search) 
    If @error Then ExitLoop
    
    MsgBox(4096, "File:", $file)
WEnd

FileClose($search)



Get Beta versions Here Get latest SciTE editor Here AutoIt 1-2-3 by Valuater - A great starting point.

Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Share this post


Link to post
Share on other sites

$search = FileFindFirstFile("000*.*")  

If $search = -1 Then
    MsgBox(0, "Error", "No files/directories matched the search pattern")
    Exit
EndIf

While 1
    $file = FileFindNextFile($search) 
    If @error Then ExitLoop
    
    MsgBox(4096, "File:", $file)
WEnd

FileClose($search)
Unfortunately, that wont work. I need to allow the user to select a file from a choice of everything in a directory that doesnt contain _blah. Also I got the format of my files slightly wrong. They are more like...

0001.file

0002.file

0002_blah.file

0003.file

0003_blah.file

Share this post


Link to post
Share on other sites

Sorry for the shameless bump, but does anyone have any idea how to work around this problem....

Share this post


Link to post
Share on other sites

Sorry for the shameless bump, but does anyone have any idea how to work around this problem....

It is a M$ function inside a dll so all you can do is feed parameters that it expects. What you ask for is not what the function expects. My opinion, unless you want want to recreate this standard function..., then you do not have the option to inverse with this function.

FileOpenDialog at the moment cannot inverse the display unless something magical happens. Magic can happen though do not expect it.

Share this post


Link to post
Share on other sites

What BigDod gave you is what you'll need to use adding your filter to the information found.

Then put the data in a GuiCombo or GuiList and let the user make a choice.


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

What BigDod gave you is what you'll need to use adding your filter to the information found.

Then put the data in a GuiCombo or GuiList and let the user make a choice.

Oh, my mistake, as preprocessing is allowed. ;)

Share this post


Link to post
Share on other sites

Thanks all ;)

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