|
这个很难办到,不过有个办法,可以自己写一个应用。
扫描所有的链接,然后把每个页面的对象信息保存
下边写一个如何扫描网页中的对象伪代码例子:
static i=0;
static win_desc;
static desc;
static ret;
static attr[];
static windowname;
#Compile the name of the window for win_get_desc
windowname = "{class: window, label : \"!.*";
windowname = windowname & window;
windowname = windowname & "*\"}";
#Specify the window that you want to learn
win_get_desc(windowname, "class label", "MSW_ID","index", win_desc);
#Add the window to the new GUI map file
GUI_add("", window, "", win_desc);
set_window(window, 1);
#This loop goes over all the htmlxxxx in the window
while (obj_exists ("{class: htmlxxxx , index: "& i &"}") == E_OK)
{
#Get the next button description
obj_get_desc ( "{class: htmlxxxx , index: "& i & "}", "", "","location", desc);
#Get the label of the button
ret = split( desc, attr, "\\\"" );
#Add the htmlxxxx description to the GUI map file
GUI_add ("", window, attr[4], desc);
i++;
}
扫描该窗体中下一个对象类型,然后加入到gui map中
上边是具体扫描对象的例子,还有一个就是需要在代码中添加循环吧所有的链接都保存到一个数组中,然后用队列或者栈的算法,处理掉每一个链接,然后在把每个对象放gui map中 |
|