本帖最后由 what6621 于 2016-3-24 13:53 编辑 #RequireAdmin
#NoTrayIcon
#include <IE.au3>
#include <File.au3>
Dim $oIE = _IECreate("https://www.liveany.com/", 0, 1, 1, 0)
Sleep(1000)
$Ele = _IEGetObjById($oIE, "startBtn")
_IEAction($Ele, "click")
Dim $handle = WinGetHandle("Liveany 陌生隨機聊天 - Internet Explorer")
AdlibRegister("_Exit")
While 1
Sleep(100)
_Send()
WEnd
Func _Send()
Sleep(4000)
Local $COUNT = _FileCountLines(@ScriptDir & "\say.txt")
Local $TEXT
WinActivate($handle)
WinWaitActive($handle)
Local $COUNT = _FileCountLines(@ScriptDir & "\say.txt")
Local $TEXT
For $I = 1 To $COUNT
Sleep(1000)
$TEXT = FileReadLine(@ScriptDir & "\say.txt", $I)
$Ele = _IEGetObjById($oIE, "inputText")
_IEFormElementSetValue($Ele, $TEXT)
$SEND = _IEGetObjById($oIE, "sendMessageButton")
_IEAction($SEND, "click")
$oIE = _IEAttach("http://www.liveany.com/web.html", "url")
$Ele = _IETagNameGetCollection($oIE, "H4", 3)
If $Ele <> 0 Then
If StringInStr($Ele.outerhtml, "您已经离线了") <> 0 Then
ExitLoop
EndIf
EndIf
Sleep(5000)
Next
Sleep(2000)
$SEND = _IEGetObjById($oIE, "reConnectButton")
_IEAction($SEND, "click")
Sleep(1000)
If WinExists("Windows Internet Explorer", "") = 1 Then
WinActivate("Windows Internet Explorer", "")
ControlClick("Windows Internet Explorer", "离开此页(&L)", "[CLASS:Button; INSTANCE:1]")
EndIf
EndFunc ;==>_Send
Func _Exit()
If WinExists($handle) = 0 Then Exit
EndFunc ;==>_Exit
是这样的。在WI7系统32. 64 多无法正常运行系统。在WI8 就可以运行。系统换好几个依旧如此。好矛盾,版本是最新版。 附源码谁帮我瞧瞧。 文本一直发送不出去。http://sc1.111ttt.com/2015/1/09/11/102112205092.mp3 |