|
table = "lesson8.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);
# Flight Reservation
set_window ("Flight Reservation", 2);
obj_mouse_click ("AfxWnd40", 67, 6, LEFT);
menu_select_item ("File;Open Order...");
# Open Order
set_window ("Open Order", 3);
button_set ("Order No.", ON);
edit_set ("Edit", ddt_val(table,"Order_Num"));-----你这一步跟我的不同,你再查一下!
button_press ("OK");
# Flight Reservation
set_window ("Flight Reservation", 3);
menu_select_item ("File;Fax Order...");
# Fax Order No. 3
set_window ("Fax Order No. 3", 4);
edit_get_text("# Tickets:",Ticket);
edit_get_text("Ticket Price:",Price);
edit_get_text("Total:",Total);
# check that the total ticket price is calculate correctly.
if (Ticket*Price==Total)
tl_step("total",0,"Correct."Ticket" * $"Price" =$"Total".");
else
tl_step("total",1,"Error."Ticket"ticket at $"Price" does not equal $"Total".");
button_press ("Cancel"); |
|