Well, it seems like you first have to construct an OPENFILENAME structure, but I found something which is easier to use in my opinion.
code:
Original code by -!Felu!-, posted at the MP!L Script Developers Rescource
function BrowseForFile(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.FileName;
}
Just call the function with a initial directory path (e.g.: "C:\") and it'll open a dialog and returns the chosen path.
NOTE: This object is only available since Windows XP, but because Windows Live Messenger and Messenger Plus! Live only support XP or higher, there's no need to think of supporting pre-XP.