Re: Dialog_pickfile problem [message #59937 is a reply to message #10235] |
Tue, 22 April 2008 07:29   |
clivecook59
Messages: 26 Registered: November 2005
|
Junior Member |
|
|
On Apr 22, 10:23 am, Vince Hradil <hrad...@yahoo.com> wrote:
> On Apr 22, 9:20 am, clivecoo...@gmail.com wrote:
>
>
>
>> On Apr 22, 10:19 am, Vince Hradil <hrad...@yahoo.com> wrote:
>
>>> On Apr 22, 9:12 am, clivecoo...@gmail.com wrote:
>
>>>> Hi,
>
>>>> I am using Dialog_pickfile to write a jpeg, using file='a string i
>>>> insert here'. My problem is that if i want to change the directory in
>>>> which dialog_pickfile defaults to it wipes the string i initially
>>>> inserted. Is there a way i can fix the default filename so that the
>>>> user can pick a directory to save the jpeg without having to retype
>>>> the file name back in?
>
>>>> filename = Dialog_Pickfile(/Write, File=uname
>>>> +'-'+info.file_name,DEFAULT_EXTENSION='jpeg')
>>>> IF filename NE '' THEN Write_JPEG, filename, snapshot, True=1
>
>>>> many thanks,
>
>>>> Clive
>
>>> Seems to me that you don't want to give the user a choice to make the
>>> filename. So, why not just have them choose a directory?
>
>>> dirname = Dialog_Pickfile(/Directory)
>>> if strlen(dirname) gt 0 then File=dirname+path_sep()+uname
>>> +'-'+info.file_name+'.jpeg'
>
>> Thats a good suggestion, however i do not want to remove the
>> possibility of the user to edit the filename.
>
>> thanks
>
>> Clive
>
> How about using filter=uname+'-'+info.file_name+'.jpeg' instead of
> file?
I don't think that works as when you set filter it only displays files
with that name. In this case the file is yet to be created.
|
|
|