说明:使用selenium自动化登陆时会弹出滑块,做人机识别,使用Au3模拟鼠标移动轨迹--可验证通过
#include <MsgBoxConstants.au3>
#include <AutoItConstants.au3>
Example()
Func Example()
;列出所有窗口
Local $aList = WinList()
; Loop through the array displaying only visable windows with a title.
For $i = 1 To $aList[0][0]
;找到指定窗口
If $aList[$i][0]== "用户登录 - Google Chrome" Then
$title = $aList[$i][0];
;激活窗口到最前
WinActivate($title);
;窗口最大化
WinSetState($title,"",@SW_MAXIMIZE);
MouseMove(840,440, 100);
//按下鼠标左键
MouseDown($MOUSE_CLICK_LEFT) ;
//移动鼠标
MouseMove ( 900, 435 ,10 );
MouseMove ( 1050, 450 ,30 );
//松开左键
MouseUp($MOUSE_CLICK_LEFT);
EndIf
Next
EndFunc ;==>Example