maqleod Posted September 1, 2007 Share Posted September 1, 2007 I am using file save dialog with two filters and I find I still need to add the extension when I save a file with it. What I want to do is be able to find out what filter was selected and use that info to add the extension within the program. This is important because I manipulate the saved data differently depending on which file type is chosen. Is there any way to detect what filter was used when the save button is pressed? [u]You can download my projects at:[/u] Pulsar Software Link to comment Share on other sites More sharing options...
martin Posted September 1, 2007 Share Posted September 1, 2007 I am using file save dialog with two filters and I find I still need to add the extension when I save a file with it. What I want to do is be able to find out what filter was selected and use that info to add the extension within the program. This is important because I manipulate the saved data differently depending on which file type is chosen. Is there any way to detect what filter was used when the save button is pressed?The return is a string which includes the extension, which might not have been one of the options you gave. I don't understand why you say you need to add the extension. You can extract the extension from the returned string. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
maqleod Posted September 1, 2007 Author Share Posted September 1, 2007 I want to the user of the program be able to save in only two file types, I want those extensions added by the file save dialog, the return string will then be evaluated for the extension that is present and a function based on that extension will be executed. I am looking for a method by which the user does not have to type the extension into the filesavedialog box, but instead the extension is added automatically based on the filter which is selected within the box (the application will allow for the possibility that the extension is added as well, so that there is no file.txt.txt). The goal is that whether the user types the extension or not, the application will be able to know what extension was desired based upon the filter that was chosen. Does that make sense? [u]You can download my projects at:[/u] Pulsar Software 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