执行脚本问题
大家好,我按学习资料录了飞机定票程序里面有个签名功能的脚本,如下:是context sensitive mode下:
# Flight Reservation
set_window ("Flight Reservation", 3);
menu_select_item ("File;Open Order...");
# Open Order
set_window ("Open Order", 6);
button_set ("Order No.", ON);
edit_set ("Edit_1", "3");
button_press ("OK");
# Flight Reservation
set_window ("Flight Reservation", 4);
menu_select_item ("File;Fax Order...");
# Fax Order No. 3
set_window ("Fax Order No. 3", 2);
obj_type ("MSMaskWndClass","24678765657");
button_set ("Send Signature with order", ON);
win_mouse_drag ("Fax Order No. 3", 228, 219, 252, 210);
win_mouse_drag ("Fax Order No. 3", 244, 215, 225, 237);
win_mouse_drag ("Fax Order No. 3", 259, 218, 259, 220);
win_mouse_drag ("Fax Order No. 3", 288, 215, 297, 231);
win_mouse_drag ("Fax Order No. 3", 307, 212, 282, 248);
然后我执行时为什么签名区域内什么都没有,只一闪而过,没有我录制时的签名. 自己顶下 你签名的动作是
obj_type ("MSMaskWndClass","24678765657");
这个吗? 不是的,是下面的语句:
win_mouse_drag ("Fax Order No. 3", 228, 219, 252, 210);
win_mouse_drag ("Fax Order No. 3", 244, 215, 225, 237);
win_mouse_drag ("Fax Order No. 3", 259, 218, 259, 220);
win_mouse_drag ("Fax Order No. 3", 288, 215, 297, 231);
win_mouse_drag ("Fax Order No. 3", 307, 212, 282, 248); 一闪而过是怎么回事呢? 你在前面加个wait看看这些代码执行了没有? 一闪而过就是鼠标还是有这个动作,这几条语句执行了,但是在签名的区域里面是空白的,什么痕迹都没有,但是以analog模式录制是正常的,可以看到签的名. 在顶下 实现鼠标轨迹的还是模拟模式比较好 谢谢斑竹!是不是Context Sensitive模式实现鼠标轨迹执行时不一定在屏幕上显示出来,
模拟模式就一定可以显示.
刚刚查了win_mouse_drag ( window, start_x, start_y, end_x, end_y [, mouse_button ] );这个函数,解释The win_mouse_drag function performs a mouse drag inside a window from the start coordinates to the end coordinates. Note that the coordinates are relative to the upper left corner of the window, not the screen.窗口和屏幕有什么区别? 坐标 window工作区- 保持窗口大小或者最大化应该更准确吧..
不是以屏幕的物理坐标确定位置的.
页:
[1]