This is what I found: Enhance Your Apps with Common Dialogs: Part I

and this is the code I tried:

code:

break on


$dlg=CreateObject("MSComDlg.CommonDialog")


"set title" ?
$dlg.DialogTitle = "Get me a File!"


"set filter" ?
$dlg.Filter ="Documents|*.doc|Templates|*.dot|Text Files|*.txt"
$dlg.FilterIndex=3


"show dialog" ?
$dlg.ShowOpen


;"returns" ?
$dlg.FileName ?


but nothing happens. What am I doing wrong?

cj