# Login
set_window ("Login", 4);
edit_set ("Agent Name:", "mercury");
obj_type ("Agent Name:","<kTab>");
password_edit_set("Password:", "kzptnyoslzjsaz");
obj_type ("Password:","<kReturn>");
# Flight Reservation
set_window ("Flight Reservation", 6);
edit_set ("Date of Flight:", "11/11/11");
list_select_item ("Fly From:", "Denver"); # Item Number 0;
list_select_item ("Fly To:", "Los Angeles"); # Item Number 2;
obj_mouse_click ("FLIGHT", 25, 29, LEFT);
# Flights Table
set_window ("Flights Table", 1);
list_select_item ("Flight", "2612 DEN 08:57 AM LAX 09:55 AM NW $130.80"); # Item Number 2;
button_press ("OK");
# Flight Reservation
set_window ("Flight Reservation", 5);
edit_set ("Name:", "dionysus");
# rc = GUI_buf_get_desc_attr(".\\gui.gui","Flight Reservation","First","label",x); # GUI_buf_get_desc_attr()函数可以得到某一个对象的属性值
# pause(x);
for(i=1;i<=3;i++)
{
switch(i)
{
case 1:
{
val = "First";
break; #一定要有这个break语句
}
case 2:
{
val = "Business";
break;
}
case 3:
{
val = "Economy";
break;
}
}
rc = GUI_buf_set_desc_attr(".\\gui.gui","Flight Reservation","First","label",val);
button_set ("First", ON);
wait(2);
}
button_press ("Insert Order"); |