1.安装autoit3
下载地址:点我下载
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 (提取码:9633)
下载完成后,一直下一步即可
2.上传头像使用脚本
代码如下:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 ControlFocus("打开","","Edit1") 2 ;等待打开窗口 3 WinWaitActive("打开") 4 $d=ControlFocus("打开","","Edit1") 5 If $d==0 Then 6 Local $hWnd = WinWait("[CLASS:#32770]", "", 10) 7 ControlFocus("打开","",$hWnd) 8 EndIf 9 ;ControlSetText($hWnd, "", "Edit1", "This is some text") 10 $b=Send("C:UsersAdministratorDesktopxbselzc.jpg") 11 If $b==0 Then 12 $a=ControlSend("打开", "", "Edit1", "C:UsersAdministratorDesktopxbselzc.jpg") 13 EndIf 14 ;ControlSend("[CLASS:#32770]","gsdf","[CLASS:Edit]","aaa") 15 ;ControlSetText("打开","","Edit1","C:\Users\Administrator\Desktop\xb\selzc.jpg") 16 Sleep(2000) 17 $c=ControlClick("打开","","Button1") 18 If $c ==0 Then 19 Send("{ENTER}") 20 EndIf 21 ;判断是否存在路径错误对话框 22 $e=ControlFocus("打开","","DirectUIHWND1") 23 If $e ==1 Then 24 Send("{ENTER}") 25 Sleep(1000) 26 $f=Send("C:UsersAdministratorDesktopxbselzc.jpg") 27 If $f==0 Then 28 $g=ControlSend("打开", "", "Edit1", "C:UsersAdministratorDesktopxbselzc.jpg") 29 EndIf 30 EndIf