|
原帖由 狩猎者 于 2006-5-17 15:59 发表
table = "default.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 ...
你这个程序没有判断结果阿
table = "default.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", 4);
button_press ("Start");
# BaseBar
set_window ("BaseBar", 11);
toolbar_select_item ("ToolbarWindow32_1", "程序(P);附件;计算器");
# 计算器
win_type ("计算器",ddt_val(table, "t1") );
set_window ("计算器", 0);
obj_mouse_click ("Button_3", 9, 13, LEFT);
obj_type ("Button_3",ddt_val(table, "t2") );
obj_mouse_click ("Button_5", 30, 20, LEFT);
obj_mouse_click ("Button_1", 34, 14, LEFT);
#从计算器的结果显示框中取得结果,保存为test
obj_get_text ( object, out_text [, x1, y1, x2, y2 ] )或者edit_get_text ( edit, out_string );
win_close ("计算器");
line1=ddt_val_by_row(table,Row,"t1");
line2=ddt_val_by_row(table,Row,"t2");
line3=ddt_val_by_row(table,Row,"t3");
#判断结果
if(line3 == test)
report_msg("line1="&line1",line2="&line2",line3="&line3",right.");
else
report_msg("line1="&line1",line2="&line2",line3="&line3",wrong.");
}
ddt_close(table); |
|