|
在按照WR7.6的手册做完实验后,自己随便做了录了一个小例子,重点在练加载GUI文件,为什么会出GUI文件加载不上的错呢.
脚本如下:
#log gui file
# Flight Reservation
if(GUI_load(".\\flight4a.gui")!=0)
{
report_msg("DataCheck:Can't load .\\flight4a.gui");
texit;
}
# Check windows exists, if don't exist,call login to open it.
# Flight Reservation
if (win_exists("Flight Reservation")!=E_OK){
pause("Windows Flight Reservation don't exist");
texit;
}
# input error month
win_activate ("Flight Reservation");
set_window ("Flight Reservation", 1);
obj_mouse_click ("Button_4", 17, 14, LEFT);
obj_type ("MSMaskWndClass","132204");
if(static_check_info("MSMaskWndClass","label","Invalid month Entered The month must be greater than 01 and less than 12.")!=E_OK)
{
report_msg("DateCheck:月份输入错误提示不对!");
}
#button_press("确定");
list_select_item ("Fly From:", "Frankfurt"); # Item Number 1;
list_select_item ("Fly To:", "Los Angeles"); # Item Number 2;
obj_mouse_click ("FLIGHT", 35, 41, LEFT);
# Flights Table
set_window ("Flights Table", 1);
button_press ("OK");
# Flight Reservation
set_window ("Flight Reservation", 2);
edit_set ("Name:", "ddd");
button_set ("First", ON);
button_press ("Insert Order");
obj_wait_bitmap("Insert Done...", "Img1", 10);
# close gui file
GUI_close(".\\flight4a.gui");
运行时,弹出对话框,信息如下。
The file ".\\flight4a.gui" cannot be loaded.
The window "<No title>" already exists in rhe GUI map. |
|