|
3#
楼主 |
发表于 2008-7-22 08:39:04
|
只看该作者
以下是脚本:
table = "test.xls";
rc = ddt_open(table, DDT_MODE_READ);
if (rc!= E_OK && rc != E_FILE_OPEN)
pause("Cannot open table.");
ddt_get_row_count(table,table_RowCount);
for(table_Row = 1; table_Row <= table_RowCount; table_Row ++)
{
ddt_set_row(table,table_Row);
# Shell_TrayWnd
set_window ("Shell_TrayWnd", 0);
toolbar_button_press ("ToolbarWindow32_1", "nn"); # Button Number 1;
set_window ("mm", 1);
obj_drag ("WindowsForms10.EDIT.app.0.33c0d9d_30", 48, 6, LEFT);
obj_drop ("text1", 26, 3);
obj_type ("WindowsForms10.EDIT.app.0.33c0d9d_30",ddt_val(table, "A"));
obj_drag ("WindowsForms10.EDIT.app.0.33c0d9d_31", 54, 5, LEFT);
obj_drop ("text2", 24, 1);
obj_type ("WindowsForms10.EDIT.app.0.33c0d9d_31",ddt_val(table, "A"));
obj_drag ("WindowsForms10.EDIT.app.0.33c0d9d_32", 54, 9, LEFT);
obj_drop ("text3", 20, 5);
obj_type ("WindowsForms10.EDIT.app.0.33c0d9d_32",ddt_val(table,"A"));
obj_mouse_drag ("更新", 43, 9, 43, 8, LEFT);
# 提示
set_window ("提示", 0);
button_press ("确定");
win_close ("mm");
}
ddt_close(table);
text1\text2\text3中的值不会随Excel中的对应列的数据而变化,不知道是不是少了什么设置? |
|