Re: Dialog_pickfile problem [message #59942 is a reply to message #10235] |
Tue, 22 April 2008 07:19  |
Vince Hradil
Messages: 574 Registered: December 1999
|
Senior Member |
|
|
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'
|
|
|