smashly Posted September 24, 2010 Share Posted September 24, 2010 (edited) Hi, FileSaveDialog() doesn't return an extension of the filter used. So for example I offer a user to save an image as the format they want. I set the filter param with "Bitmap (*.bmp)|GIF (*.gif)|JPEG (*.jpg)|PNG (*.png)" The user selects from the "Save as type:" *.png and types a file name with no extension to save. But FileSaveDialog() only returns the path\filename but without an extension or filter chosen. So I have no way of knowing what filter the user selected.. Makes me wonder why there's even a "Save as type:" filter choice in the first place. Am I missing something? TYIA Edited September 24, 2010 by smashly Link to comment Share on other sites More sharing options...
smashly Posted September 24, 2010 Author Share Posted September 24, 2010 (edited) NVM, found a workaround Here (2+ Year old post).Just in case anyone was curious.Cheers Edited September 24, 2010 by smashly Link to comment Share on other sites More sharing options...
wakillon Posted September 24, 2010 Share Posted September 24, 2010 Try to open notepad and save astype a name , it will be save without extension ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
smashly Posted September 24, 2010 Author Share Posted September 24, 2010 (edited) Hi, Your wrong... my windows notepad saves an extension even when I do not type one in. But that's not the point. I don't care about the extension being added, it's that I don't know the filter the user selected. The point is AutoIt's built in FileSaveDialog() pretty well useless under certain circumstances. If it doesn't return a Filter or Add an extension when a filter is chosen then what's the point of setting "Save as type:" filters Cheers Edited September 24, 2010 by smashly Link to comment Share on other sites More sharing options...
wakillon Posted September 24, 2010 Share Posted September 24, 2010 I understand what you mean. I just do a comparison with notepad ( who doesn't add extension for mine ) when you say you 're missing something ! So, for me there was no differences, so no problem ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now