#include <string.au3>
#include <File.au3>
#include <systray UDF.au3>
If FileExists("I.log") = 0 Then
$m = MsgBox(4, "提示", "不存在I.log文件,是否初始化创建?")
If $m = 6 Then FileWrite("I.log", "1")
If $m = 7 Then Exit
Else
$i = FileReadLine("I.log", 1)
EndIf
For $j = 1 To 3
$array = StringSplit(FileReadLine(FileOpen("QQ.txt", 0), $i), "----", 1)
$QQPID=Run("C:\Program Files\Tencent\TM\Bin\TM.EXE")
Sleep(1000)
ControlSetText("TM2009", "", "ATL:30A4D1D81", $array[2], 1)
Sleep(200)
ControlSend("TM2009", "", "Edit1", $array[3], 1)
Sleep(2000)
;Send("{enter}")
;$WinList = WinList('[class:TXGuiFoundation;title:TM2009]')
;For $j = 1 To $WinList[0][0]
WinMove(WinGetHandle ("TM2009"), '', @DesktopWidth - 330, 20)
WinSetState(WinGetHandle ("TM2009"), '', @SW_SHOW)
;Sleep(2000)
ControlClick(WinGetHandle ("TM2009"), '', '', '', 1, 115, 379) ;==>点击登录按钮
Sleep(5000)
;Next
$i = $i + 1
_FileWriteToLine("I.log", 1, $i, 1)
Sleep(5000)
Next
;MINIMIZEQQWIN() ;最小化所有QQ
For $o=1 To 3
ProcessClose($QQPID)
_SysTrayIcon_Clean() ;刷新托盘图标
next
Func MINIMIZEQQWIN($QQTitle = 1) ;最小化所有QQ
If $QQTitle = 1 Then
$QQWINList = WinList('[Class:TXGuiFoundation; Title:TM2009]')
For $Qwl = 1 To $QQWINList[0][0]
$QQWINPOS = WinGetPos($QQWINList[$Qwl][1])
If Not @error Then
ControlClick($QQWINList[$Qwl][1], '', '', 'left', 1, $QQWINPOS[2] - 82, 10)
EndIf
Next
Else
If WinExists($QQTitle) Then
$QQWINPOS = WinGetPos($QQTitle)
If Not @error Then
ControlClick($QQTitle, '', '', 'left', 1, $QQWINPOS[2] - 82, 10)
EndIf
EndIf
EndIf
EndFunc ;==>MINIMIZEQQWIN