Ok, so I'm using this code:
jscript code:
function BrowseForPm(InitialDir)
{
BrowseFilter = "Text Files (*.txt)|*.txt|All Files|*.*";
var BrowseDialog = new ActiveXObject("UserAccounts.CommonDialog")
BrowseDialog.Filter = BrowseFilter;
BrowseDialog.InitialDir = InitialDir;
BrowseDialog.Flags = "&H4";
BrowseDialog.ShowOpen()
return BrowseDialog.FilePath;
pm = BrowseDialog.FilePath;
}
The dialog shows up fine, but it seems like the file path isn't being saved to the variable. Does anyone know what the problem is? I've been trying to make a dialog that works for days, searched this entire forum for anything related to CommonDialog and found nothing helpful.
Also, this type of dialog has been replaced with a new kind of dialog in Windows Vista, something called ItemDialog, so it won't even show up. So does anyone know the code that would be equivalent to this for the new Vista ItemDialog, because this won't work(I actually tested it just in case).
Thanks in advance for all your help.