Hi,
The following method can be used to select a folder...
function getFolderPath(){
var objShell = new ActiveXObject("Shell.Application");
var objFolder = objShell.BrowseForFolder(0, "Save file in...",
0); // This works in both Vista & XP
if(objFolder != null){
return objFolder.self.Path; // returns selected folder
path as a
string
}
return null;
}
refer: http://msdn.microsoft.com/en-us/library/bb774065(VS.85).aspx
You can ask the user to type a name for the file and prompt to select
a folder (using the above function) and save the file in that folder.
That works in both Vista and XP.
But I think there should be a better way to do it. Like in Scratch pad
gadget.... :)
On Sep 6, 3:15 pm, "Arnab Roy" <[EMAIL PROTECTED]> wrote:
> how? if one selects a file, that file would get overwritten. n ders no
> method of selecting a folder or creating a new file
>
> On 26/08/2008, Teo <[EMAIL PROTECTED]> wrote:
>
>
>
> > Hi,
>
> > i think you can use framework.BrowseForFile();
> > It's meant for opening but i think you can use it as a save dialog too.
>
> > Thanks,
> > Teo
>
> > On Tue, Aug 26, 2008 at 2:38 PM, Lakmal Jayathilaka <[EMAIL PROTECTED]>
> > wrote:
>
> > > Hi,
>
> > > Does anyone know, how to open a "Save As" dialog box in Vista , using
> > > a gadget?
> > > I want to get the path from user to save a wav file...
>
> > > I searched this problem in this group & in some other sites.
> > > They say to use "SAFRCFileDlg.FileSave" .
> > > It works in XP. But it doesn't work in Vista...
>
> > > BUT the 'Scratch Pad' gadget can open a "Save As" dialog box in both
> > > XP & Vista... :)
> > > Does anyone know how to do that?
>
> > > ------------------
>
> > > Thanks.
>
> > > Lakmal
>
> > --
> > Teo (a.k.a. Teodor Filimon, Teominator)
> > Site -www.teodorfilimon.com| Blog -www.teodorfilimon.blogspot.com
> > GMT +2 (or PDT +10)
>
> --
> Do not forget to visit our website :http://arnab321.tripod.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Desktop-Developer?hl=en
-~----------~----~----~----~------~----~------~--~---