ask file with filter/type - how to read the selected type ?

viktoras didziulis viktoras at ekoinf.net
Tue Jun 10 12:52:23 EDT 2008


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?
>
>




More information about the use-livecode mailing list