I think this is more what your after Ron
only populates the edit field when navigated to a folder(right click and open or double left click)
only populates the edit field when navigated to a folder(right click and open or double left click)
str dd=
;BEGIN DIALOG
;0 "" 0x90CF0AC8 0x1 0 0 242 168 "Dialog"
;3 ActiveX 0x54000000 0x0 5 7 114 141 "SHDocVw.WebBrowser"
;8 Edit 0x54030080 0x200 5 151 224 12 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2040601 "*" "" "" ""
str controls = "3 8"
str ax3SHD e8
if(!ShowDialog(dd &sub.DlgProc &controls)) ret
out e8
#sub DlgProc
function# hDlg message wParam lParam
SHDocVw.WebBrowser we3
int- MhDlg
sel message
,case WM_INITDIALOG
,we3._getcontrol(id(3 hDlg))
,we3._setevents("sub.we3")
,;initial folder
,we3.Navigate(_s.expandpath("$Documents$"))
,MhDlg=hDlg
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#sub we3_TitleChange
function BSTR'Text SHDocVw.IWebBrowser2'we3
str fp s1 url=we3.LocationURL
PARSEDURLW pu
pu.cbSize=sizeof(pu)
ParseURLW(@url &pu)
s1.ansi(pu.pszSuffix)
s1.escape(8)
int- MhDlg
GetFullPath(s1 &fp)
fp.setwintext(id(8 MhDlg))
out fp