重复登录Windows远程桌面-Autoit脚本

  非常抱歉,我先临时把脚本放上来,具体的说明有时间再更新:

都是做成快捷方式,用鼠标点击的操作

#include <AutoItConstants.au3>

Dim $count = 12


while $count < 2000
; Open mstsc program from desktop shortcut by x y.
MouseClick($MOUSE_CLICK_LEFT, 104, 455, 2)

; wait mstsc input frame available.
WinWait("[CLASS:#32770]","",10)

; input remote PC ip address
ControlSetText("Remote Desktop Connection", "", "Edit1", "172.18.0.101")

;ControlFocus("title","text",controlID) Remote Desktop Connection 1
ControlFocus("Remote Desktop Connection", "","1")

 Sleep(2000)
;click connection button
ControlClick("Remote Desktop Connection", "","Button5")

Sleep(2000)

;select another user button
MouseClick($MOUSE_CLICK_LEFT, 798, 338, 1)

;input username
ControlSetText("Windows Security", "", "Edit2", "user"&$count&"")

;input password
ControlSetText("Windows Security", "", "Edit3", "Firewall1")

;click OK button
ControlClick("Windows Security", "","Button2")

;click remote certificate YES button
Sleep(2000)
MouseClick($MOUSE_CLICK_LEFT, 1020, 500, 1)

Sleep(5000)
;select cancel of Windows Activation
MouseClick($MOUSE_CLICK_LEFT, 1230, 782, 2)

Sleep(10000)
;run test bat(send http POST and logoff)
MouseClick($MOUSE_CLICK_LEFT, 31, 343, 2)

Sleep(5000)
$count = $count + 1
WEnd

 

posted @ 2016-03-12 13:37  bonjov1  阅读(971)  评论(0编辑  收藏  举报