Re: ask file with filter/type - how to read the selected type ?
viktoras didziulis wrote: is there any way to know what file type user selects in ask file with filter dialog ? I need to specify different handlers for file Save as, and now am first asking user to select the type of a desired output (i.e. raw binary, ascii text, png image or ppm image) and next opening ask file dialog to get the path for saving the data. But I know this is not good, because users are used to a single dialog for file saving where they choose save as type and the data is processed without any additional disturbances... The problem is that the selection of ask file dialog is returned in 'it' variable but the selected type of file in the dropdown list of that dialog is not returned in any readable way, or is it?.. Check the result after the user selects a file. The tag is in there. -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: ask file with filter/type - how to read the selected type ?
Jacqueline, Thanks for the suggestion, still 'the result' after execution is empty. It would probably contain something if path selection failed. The other 'result' (path stored in 'it') does not always contain an extension. If user types it in, or chooses from a list of existing file names, then it is there. But otherwise if user provides file name without an extension, script has to check what was the file type selected, appends correct extension and directs output to a necessary processing handler. It knows file type just because it asked about it before asking for the path. Now I guess if I wish to avoid displaying a chain of dialogs, I have to design own custom askFile() function or handler. The only role of ask file with type or ask file with filter that is described in the dictionary seems to be limited to displaying existing filenames whose types match the one selected in the file type list... All the best! Viktoras J. Landman Gay wrote: viktoras didziulis wrote: is there any way to know what file type user selects in ask file with filter dialog ? I need to specify different handlers for file Save as, and now am first asking user to select the type of a desired output (i.e. raw binary, ascii text, png image or ppm image) and next opening ask file dialog to get the path for saving the data. But I know this is not good, because users are used to a single dialog for file saving where they choose save as type and the data is processed without any additional disturbances... The problem is that the selection of ask file dialog is returned in 'it' variable but the selected type of file in the dropdown list of that dialog is not returned in any readable way, or is it?.. Check the result after the user selects a file. The tag is in there. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: ask file with filter/type - how to read the selected type ?
viktoras didziulis wrote: Jacqueline, Thanks for the suggestion, still 'the result' after execution is empty. It would probably contain something if path selection failed. The other 'result' (path stored in 'it') does not always contain an extension. If user types it in, or chooses from a list of existing file names, then it is there. But otherwise if user provides file name without an extension, script has to check what was the file type selected, appends correct extension and directs output to a necessary processing handler. I misread your post, I didn't notice you were using filter. But I just did a test using with type and it works. on mouseUp ask file Export picture as: with type JPEG File|jpg|JPEG or type GIF File|gif|GIFf put the result into tResult put it tResult end mouseUp I typed in a file name without an extension. The message box contained the path to the file and JPEG File. Will that work for you? -- Jacqueline Landman Gay | [EMAIL PROTECTED] HyperActive Software | http://www.hyperactivesw.com ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: ask file with filter/type - how to read the selected type ?
Thanks A LOT! With type it the result works now! All the best! Viktoras J. Landman Gay wrote: viktoras didziulis wrote: Jacqueline, Thanks for the suggestion, still 'the result' after execution is empty. It would probably contain something if path selection failed. The other 'result' (path stored in 'it') does not always contain an extension. If user types it in, or chooses from a list of existing file names, then it is there. But otherwise if user provides file name without an extension, script has to check what was the file type selected, appends correct extension and directs output to a necessary processing handler. I misread your post, I didn't notice you were using filter. But I just did a test using with type and it works. on mouseUp ask file Export picture as: with type JPEG File|jpg|JPEG or type GIF File|gif|GIFf put the result into tResult put it tResult end mouseUp I typed in a file name without an extension. The message box contained the path to the file and JPEG File. Will that work for you? ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution
Re: ask file with filter/type - how to read the selected type ?
You have to use the ask file with type form to know the file type selected within the dialogue, for example: on mouseUp ask file with type PNG file|png|PNGf or type Plain file|txt|TEXT put it the result end mouseUp message box: /Users/bvg/Desktop/file.txt Plain file Most likely ask file with filter will be marked as obsolete or discontinued in a not too distant future... Have Fun Björnke On 10 Jun 2008, at 17:57, viktoras didziulis wrote: Jacqueline, Thanks for the suggestion, still 'the result' after execution is empty. It would probably contain something if path selection failed. The other 'result' (path stored in 'it') does not always contain an extension. If user types it in, or chooses from a list of existing file names, then it is there. But otherwise if user provides file name without an extension, script has to check what was the file type selected, appends correct extension and directs output to a necessary processing handler. It knows file type just because it asked about it before asking for the path. Now I guess if I wish to avoid displaying a chain of dialogs, I have to design own custom askFile() function or handler. The only role of ask file with type or ask file with filter that is described in the dictionary seems to be limited to displaying existing filenames whose types match the one selected in the file type list... All the best! Viktoras J. Landman Gay wrote: viktoras didziulis wrote: is there any way to know what file type user selects in ask file with filter dialog ? I need to specify different handlers for file Save as, and now am first asking user to select the type of a desired output (i.e. raw binary, ascii text, png image or ppm image) and next opening ask file dialog to get the path for saving the data. But I know this is not good, because users are used to a single dialog for file saving where they choose save as type and the data is processed without any additional disturbances... The problem is that the selection of ask file dialog is returned in 'it' variable but the selected type of file in the dropdown list of that dialog is not returned in any readable way, or is it?.. Check the result after the user selects a file. The tag is in there. ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-revolution