|
table = "houlai.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);
# Program Manager
set_window ("Program Manager", 2);
list_activate_item ("SysListView32", "Flight 4A");
# Shell_TrayWnd
set_window ("Shell_TrayWnd", 3);
toolbar_button_press ("ToolbarWindow32_1", "Login"); # Button Number 5;
# Login
set_window ("Login", 2);
edit_set ("Agent Name:", "sdfsf");
obj_type ("Agent Name:","<kTab>");
password_edit_set("Password:", "kzptnyoslzjsaz");
obj_type ("Password:","<kReturn>");
# Flight Reservation
set_window ("Flight Reservation", 9);
menu_select_item ("File;Open Order...");
# Open Order
set_window ("Open Order", 1);
button_set ("Order No.", ON);
edit_set ("Edit_1", ddt_val(table,"lalala"));
button_press ("OK");
# Flight Reservation
set_window ("Flight Reservation", 1);
menu_select_item ("File;Fax Order...");
set_window("Fax Order No. 3", 1);
edit_get_text("# Tickets:",Tickets);
edit_get_text("Ticket Price:",Price);
edit_get_text("Total:",Total);
if(Tickets*Price == Total)
tl_step("total",0, "total is correct.");
else
tl_step("total",1, "total is incorrect");
# Shell_TrayWnd
set_window ("Shell_TrayWnd", 2);
toolbar_button_press ("ToolbarWindow32_1", "Flight Reservation"); # Button Number 5;
# Shell_TrayWnd
set_window ("Shell_TrayWnd", 3);
toolbar_button_press ("ToolbarWindow32_1", "Flight Reservation"); # Button Number 6;
# Fax Order No. 3
win_close ("Fax Order No. 3");
# Flight Reservation
win_close ("Flight Reservation");
}
ddt_close(table); |
|