关于值的取得,我用了映射,但似乎不是每次都可以读出来,就算读出来了,也返回错误,显示不相等。
具体脚本如下:
set_class_map("ThunderRT6TextBox", "edit");
set_record_attr("ThunderRT6TextBox", "class attached_text", "MSW_id", "location");
set_record_method("ThunderRT6TextBox", RM_RECORD);
set_class_map("ThunderRT6TextBox", "edit");
set_record_attr("ThunderRT6TextBox", "class attached_text", "MSW_id", "location");
set_record_method("ThunderRT6TextBox", RM_RECORD);
# Flight Reservation
set_window ("Flight Reservation", 2);
menu_select_item ("File;Open Order...");
# Open Order
set_window ("Open Order", 1);
obj_mouse_click ("Order No.", 3, 11, LEFT);
edit_set ("ThunderRT6TextBox_2", "4");
obj_mouse_click ("OK", 43, 10, LEFT);
# Flight Reservation
set_window ("Flight Reservation", 12);
edit_set ("ThunderRT6TextBox_9", "2");
obj_mouse_click ("Order Information:", 254, 152, LEFT);
set_window("Flight Reservation", 1);
edit_get_text("ThunderRT6TextBox_9",ThunderRT6TextBox_9);
edit_get_text("ThunderRT6TextBox_10",ThunderRT6TextBox_10);
edit_get_text("ThunderRT6TextBox_11",ThunderRT6TextBox_11);
if (ThunderRT6TextBox_9*ThunderRT6TextBox_10==ThunderRT6TextBox_11)
tl_step("ThunderRT6TextBox_11",0,"总额是正确的,"ThunderRT6TextBox_9"乘以"ThunderRT6TextBox_10"等于"ThunderRT6TextBox_11"");
else
tl_step("ThunderRT6TextBox_11",1,"总额是不正确的,"ThunderRT6TextBox_9"乘以"ThunderRT6TextBox_10"不等于"ThunderRT6TextBox_11""); 脚本执行后的结果信息如附件截图,麻烦哪位DX请分析一下啊,谢。 |