找回密码
 加入
搜索
查看: 9595|回复: 4

[求购] 100元写个阿里旺旺群群发脚本 以前有脚本可以参考

[复制链接]
发表于 2012-12-8 12:19:57 | 显示全部楼层 |阅读模式
悬赏1金钱未解决
#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[0][0]
        Dim $lasttitle = "", $Buttonid = 0, $wwuser, $wwpassword, $wwpid, $logonHWND, $userHWND, $n, $Buttonid = 0, $msgHWND, $title, $lasttitle = "lasttitle"
        Dim $pos,$winpos
        $wwuser = $idlist[$i][0]
        $wwpassword = $idlist[$i][1]
;~         删除安装目录残留的用户属性文件,防止群列表树显示不对应
        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[0]+$pos[0]+Int($pos[2]/2), $winpos[1]+$pos[1]+Int($pos[3]/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
                If StringInStr(ControlGetText($userHWND, "", $n), "我的群") Then
                        $Buttonid = $n
                        ExitLoop
                EndIf
        Next
        If $Buttonid = 0 Then
                MsgBox(0, "错误", "获取(我的群)按钮控件ID失败~!")
                ExitLoop
        EndIf
        ControlClick($userHWND, "", $Buttonid)
        WinActivate($userHWND)
        ControlFocus($userHWND, "", "WWUI.SuperListView2")
        ControlSend($userHWND, "", "WWUI.SuperListView2", "{HOME}")
        ControlSend($userHWND, "", "WWUI.SuperListView2", "{DOWN}")
        ControlSend($userHWND, "", "WWUI.SuperListView2", "{DOWN}")
        Opt("WinTitleMatchMode", 2)
        While 1
                WinActivate($userHWND)
                ControlFocus($userHWND, "", "WWUI.SuperListView2")
                ControlSend($userHWND, "", "WWUI.SuperListView2", "{DOWN}")
                ControlSend($userHWND, "", "WWUI.SuperListView2", "{ENTER}")
                $msgHWND = WinWait("(群号:", "", 5)
                If Not IsHWnd($msgHWND) Then ExitLoop
                $title = WinGetTitle($msgHWND, "")
                If $title = $lasttitle Then ExitLoop
                ControlSetText($msgHWND, "", "RichEditComponent1", $str)
                ControlSend($msgHWND, "", "RichEditComponent1", "{ENTER}")
                Sleep(500)
                WinClose($msgHWND)
                $lasttitle = $title
        WEnd
        Opt("WinTitleMatchMode", 1)
        ProcessClose($wwpid)
Next
ProcessClose($wwpid)
Exit

 楼主| 发表于 2012-12-8 12:21:20 | 显示全部楼层
联系QQ605911893
发表于 2012-12-11 21:11:51 | 显示全部楼层
银子太多了点
少点我就搞了
发表于 2012-12-14 23:39:36 | 显示全部楼层
不为钱,有空我帮你看看
发表于 2013-1-21 13:40:05 | 显示全部楼层
PS:旺旺发送有的,不过限制了每天20-30人的发送,没有什么实际意义了
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-11-23 16:19 , Processed in 0.122035 second(s), 17 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表