leiqq 发表于 2012-9-27 10:30:15

50元做个 阿里贸易通批量加群脚本

本人有个群发的脚本 可以参照修改
#RequireAdmin
Opt("SendKeyDownDelay", 20)
Global $wwpath, $idlist,$str
$str=FileRead(@ScriptDir&"\发送内容.txt")
$wwpath = IniRead(@ScriptDir & "\name.ini", "设置", "旺旺安装路径", "")
If Not FileExists($wwpath & "\AliIM.exe") Then
        MsgBox(0, "错误", "指定的旺旺主程序不存在,请修改配置文件内相应项目~!")
        Exit
EndIf
$idlist = IniReadSection(@ScriptDir & "\name.ini", "帐号=密码")
For $i = 1 To $idlist
        Dim $lasttitle = "", $Buttonid = 0, $wwuser, $wwpassword, $wwpid, $logonHWND, $userHWND, $n, $Buttonid = 0, $msgHWND, $title, $lasttitle = "lasttitle"
        Dim $pos,$winpos
        $wwuser = $idlist[$i]
        $wwpassword = $idlist[$i]
;~         删除安装目录残留的用户属性文件,防止群列表树显示不对应
        DirRemove($wwpath & "\profiles\cnalichn" & $wwuser, 1)
        $wwpid = Run($wwpath & "\AliIM.exe")
        $logonHWND = WinWait("阿里旺旺2011", "", 10)
        If Not IsHWnd($logonHWND) Then
                MsgBox(0, "错误", "运行旺旺安装程序后为发现登陆窗口,请检查安装路径设置是否正确~!")
                ExitLoop
        EndIf
        ControlClick($logonHWND, "", "StandardButton2")
        Send("{DOWN}")
        Send("{ENTER}")
        ControlSetText($logonHWND, "", "EditComponent2", $wwuser)
        ControlSend($logonHWND, "", "ATL:Edit1", $wwpassword)
;~         以下为点登陆按钮代码,由于自动发送容易出现密码错误,所以做两次重试
        BlockInput(1)
        Sleep(300)
        $pos=ControlGetPos($logonHWND, "", "StandardButton8")
        $winpos=WinGetPos($logonHWND)
        ControlClick($logonHWND, "", "StandardButton8")
        Sleep(3000)
        If Not WinExists($wwuser & "-阿里旺旺2011") Then MouseClick("left", $winpos+$pos+Int($pos/2), $winpos+$pos+Int($pos/2),1,0)
        BlockInput(0)
        $userHWND = WinWait($wwuser & "-阿里旺旺2011", "", 20)
        If Not IsHWnd($userHWND) Then
                MsgBox(0, "错误", "未检测到登陆后的旺旺窗口,请检查帐号密码设置是否正确~!")
                ExitLoop
        EndIf
        Sleep(3000)
;~         循环检测我的群按钮的控件id(此id为动态的)
        For $n = 1000 To 2999

leiqq 发表于 2012-9-27 10:30:46

联系qq605911893
页: [1]
查看完整版本: 50元做个 阿里贸易通批量加群脚本