10-18-2012, 02:08 PM
Hello,
i have alittle problem with this code given in Acc.GetChildObjects help.
get name/URL of all Firefox tabs
int w=win("Mozilla Firefox" "Mozilla*WindowClass" "" 0x804)
Acc a.Find(w "DOCUMENT" "" "" 0x3010 2 0 "parent3") ;;find current DOCUMENT and get its parent GROUPING
ARRAY(Acc) b; int i
a.GetChildObjects(b 2 "DOCUMENT" "" "" 16) ;;get all child DOCUMENT at level 2, including hidden
for i 0 b.len
out "--------"
out b[i].Name ;;page name
out b[i].Value ;;page URL
if(b[i].State&STATE_SYSTEM_INVISIBLE=0) out "<visible>"
I found it working perfectly as long as a web page has content, empty DOCUMENT webpage throw exception , which is normal due to the 0x3010 flag.
For example, my firefox homepage is Speed dial, which have an APPLICATION property in place of DOCUMENT. If I test the above code with a tab containig speeddial page
it does not work.
I'd like the code to skip the first faulty tab, and begin enumeration from another tab which does have a DOCUMENT property to retreive all tabs.
In fact, it's a short version of the problem which actually reside in the FirefoxGetTabs , but the solution for this one should apply to it too.
Possible?
Thanks.
i have alittle problem with this code given in Acc.GetChildObjects help.
get name/URL of all Firefox tabs
int w=win("Mozilla Firefox" "Mozilla*WindowClass" "" 0x804)
Acc a.Find(w "DOCUMENT" "" "" 0x3010 2 0 "parent3") ;;find current DOCUMENT and get its parent GROUPING
ARRAY(Acc) b; int i
a.GetChildObjects(b 2 "DOCUMENT" "" "" 16) ;;get all child DOCUMENT at level 2, including hidden
for i 0 b.len
out "--------"
out b[i].Name ;;page name
out b[i].Value ;;page URL
if(b[i].State&STATE_SYSTEM_INVISIBLE=0) out "<visible>"
I found it working perfectly as long as a web page has content, empty DOCUMENT webpage throw exception , which is normal due to the 0x3010 flag.
For example, my firefox homepage is Speed dial, which have an APPLICATION property in place of DOCUMENT. If I test the above code with a tab containig speeddial page
it does not work.
I'd like the code to skip the first faulty tab, and begin enumeration from another tab which does have a DOCUMENT property to retreive all tabs.
In fact, it's a short version of the problem which actually reside in the FirefoxGetTabs , but the solution for this one should apply to it too.
Possible?
Thanks.
