03-10-2011, 07:42 PM
Maybe does not work because your web browser control is so small. Make big and remove WS_VISIBLE style or move somewhere far.
Or maybe the web page is not completely loaded. Before foreach insert acc that finds an object in the page. Add 30 s wait time. Or instead of _s.setwintext(id(5 hDlg)) load the page using web with waiting (better in ScanName, not in Dialog3).
Macro Dialog3
Function ScanName
Or maybe the web page is not completely loaded. Before foreach insert acc that finds an object in the page. Add 30 s wait time. Or instead of _s.setwintext(id(5 hDlg)) load the page using web with waiting (better in ScanName, not in Dialog3).
Macro Dialog3
Function ScanName
;\
function hwnd $url
str name1 listofnames="Board index[]Untitled[]QM and Forum Info"
;start
web url 1 hwnd ;;open the url in your web browser control
;acc(... 30) ;;find an object that always exist in the page when the page is completely loaded. Wait for it max 30 s. 30 is 'waits' argument.
Acc a
foreach name1 listofnames
,a=acc(name1 "LINK" hwnd "Internet Explorer_Server" "" 0x1010); err out "'%s' not found" name1; continue
,str name=a.Name
,if matchw(name name1)
,,out name
,out "1"