电脑版微信多开显示网络代理服务器,PC版微信多开

#NoTrayIcon

#RequireAdmin

#PRE_UseX64=n

#QQ群:477266297

#include

#include

#include

#include

#include

Opt("GUIOnEventMode", 1)

Global $WeChatPath = ''

_GetWeChatPath()

#Region ### START Koda GUI section ### Form=

Global $MainForm = GUICreate("MainForm", 280, 200, -1, -1)

Global $Btn_Start = GUICtrlCreateButton('AddNew', 5, 5, 80, 21)

Global $Btn_Multi = GUICtrlCreateButton('Multi', 5, 35, 80, 21)

Global $Btn_CloseAll = GUICtrlCreateButton('CloseAll', 5, 65, 80, 21)

Global $Ipt_Num = GUICtrlCreateInput('5', 105, 35, 80, 21)

GUISetState(@SW_SHOW)

GUISetOnEvent(-3, '_Exit')

GUICtrlSetOnEvent($Btn_Start, '_SetParent')

GUICtrlSetOnEvent($Btn_Multi, '_MultiStart')

GUICtrlSetOnEvent($Btn_CloseAll, '_CloseAll')

#EndRegion ### END Koda GUI section ###

While 1

Sleep(100)

WEnd

Func _Exit()

Exit

EndFunc ;==>_Exit

Func _CloseAll()

Local $aWindows = _WinAPI_EnumWindowsTop()

For $j = 1 To $aWindows[0][0]

If $aWindows[$j][1] = 'WeChatMainWndForPC' Or $aWindows[$j][1] = 'WeChatLoginWndForPC' Then WinClose($aWindows[$j][0])

Next

EndFunc ;==>_CloseAll

Func _MultiStart()

Local $Number = GUICtrlRead($Ipt_Num)

If $Number > 0 Then

GUICtrlSetState($Btn_Multi, $GUI_DISABLE)

For $i = 1 To $Number

Run($WeChatPath)

WinWait('[CLASS:WeChatLoginWndForPC]')

Local $aWindows = _WinAPI_EnumWindowsTop()

For $j = 1 To $aWindows[0][0]

If $aWindows[$j][1] = 'WeChatMainWndForPC' Or $aWindows[$j][1] = 'WeChatLoginWndForPC' Then _WinAPI_SetParent($aWindows[$j][0], $MainForm)

Next

;~ WinExists('[CLASS:WeChatLoginWndForPC]')

Next

_OutParent()

GUICtrlSetState($Btn_Multi, $GUI_ENABLE)

EndIf

EndFunc ;==>_MultiStart

Func _GetWeChatPath()

$WeChatPath = RegRead('HKEY_CURRENT_USER\Software\Tencent\WeChat', 'InstallPath')

$WeChatPath &= '\WeChat.exe'

If Not FileExists($WeChatPath) Then Exit MsgBox(0, 'Error', '系统中未安装PC版微信,程序退出!', -1, 0)

EndFunc ;==>_GetWeChatPath

Func _SetParent()

GUICtrlSetState($Btn_Start, $GUI_DISABLE)

Local $aWindows = _WinAPI_EnumWindowsTop()

For $i = 1 To $aWindows[0][0]

If $aWindows[$i][1] = 'WeChatMainWndForPC' Or $aWindows[$i][1] = 'WeChatLoginWndForPC' Then _WinAPI_SetParent($aWindows[$i][0], $MainForm)

Next

Run($WeChatPath)

WinWait('[CLASS:WeChatLoginWndForPC]')

_OutParent()

GUICtrlSetState($Btn_Start, $GUI_ENABLE)

EndFunc ;==>_SetParent

Func _OutParent()

Local $List = _WinAPI_EnumChildWindows($MainForm)

For $i = 1 To $List[0][0]

If $List[$i][1] = 'WeChatMainWndForPC' Or $List[$i][1] = 'WeChatLoginWndForPC' Then _WinAPI_SetParent($List[$i][0], 0)

Next

EndFunc ;==>_OutParent

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值