网易邮箱批量登泉器v1.0

1. 资源

直接下载点开即可使用

2. 写在前面

  • 对于很多用户来说,有时候需要使用多邮箱账号进行登录。如果一个一个的手动登录邮箱不是不可以,而是感觉太麻烦了,特别是需要登录的邮箱数量达到几十或者几百的时候,用手工一个个输入,简直是一种灾难。既然懒惰是一种美德,那么我们能做到自动化的事情,为什么要手动呢?于是便有了下面的这个小脚本,看一集《三体》动漫的时间,我的几百个163邮箱账号全部登录完毕,我娱乐他办公,Very Nice~

3. 效果

4. 使用说明

  • 每一次登录的时候,应该将网易邮箱大师全屏,可以避免由于位置的不同而导致的按钮发生变化,同时打开邮箱设置界面

  • 我的电脑显示器分辨率是1920X1080。如果你的分辨率和我的不一样,那么需要自己手动更改一下其中坐标。

  • 至于这几个按钮,没啥难懂的,它的功能就和它的名称一样,试一下就知道了。

  • 密码文件应该按行设置为,前面是密用户名后面是密码,中间用Tab隔开。

  • 中间需要暂停的话,按一下F7键,如果需要重启脚本,那么按一下F8。

5. 代码

5.1. 代码设计原理

  • 在设置这里点击登录邮箱,登录成功之后不会退出这个页面,可以使用AutoHotkey脚本重复登录多个邮箱

5.2. 核心代码

### #SingleInstance Ignore 			;;执行特定窗口前先关闭特定窗口 
 
SwitchIME(dwLayout){				;;切换输入法使用的子函数 
	HKL:=DllCall("LoadKeyboardLayout", Str, dwLayout, UInt, 1) 
	ControlGetFocus,ctl,A 
	SendMessage,0x50,0,HKL,%ctl%,A 
} 
 
 
等待窗口出现并将其激活(title) 
{ 
	WinWait, %title%, 			;等待窗口出来 
	IfWinNotActive, %title%, , WinActivate, %title%, 
	WinWaitActive, %title%, 
   
} 
 
等待窗口出现并将其激活("网易邮箱大师") 
WinMaximize,网易邮箱大师 
 
strings := FileOpen("E:\Documents\Desktop\info.txt", "r").Read() 
 
Loop, parse, strings, `n 
{ 
    lines := A_LoopField 
    word_array := StrSplit(lines, A_Tab , ".")  ; 忽略句点.  
    users := word_array[1] 
    pass := word_array[2] 
    ;MsgBox,% word_array[1] 
    x1 := 400   ;添加邮箱 
    y1 := 524 
    Click,%x1%,%y1% 
    SwitchIME(0x04090409)             ;;切换英文输入法 
    Sleep 1000 
    send,%users% 
    Sleep 1000 
     
    send,{Tab} 
    Sleep 1000 
     
    send,%pass% 
    Sleep 1000 
    send,{Enter} 
    Sleep 1000 
     
}

5.3. 完整代码

### ; Generated by Auto-GUI 3.0.1 
#SingleInstance Force 
#NoEnv 
SetWorkingDir %A_ScriptDir% 
SetBatchLines -1 
;#Include 热键.ahk  
 
 
 
 
Gui Font, s9, Segoe UI 
 
Gui Add, Button, x232 y93 w152 h52, 批量登录网易邮箱 
Gui Add, Button, x43 y198 w525 h192, 暂停 
Gui Add, Button, x407 y93 w152 h52, 重启脚本 
Gui Add, Button, x48 y93 w152 h52, 选择密码文件 
 
 
Gui Show, w620 h420, 网易邮箱批量登录器 v1.0 
Return 
 
 
SwitchIME(dwLayout){				;;切换输入法使用的子函数 
	HKL:=DllCall("LoadKeyboardLayout", Str, dwLayout, UInt, 1) 
	ControlGetFocus,ctl,A 
	SendMessage,0x50,0,HKL,%ctl%,A 
} 
 
 
等待窗口出现并将其激活(title) 
{ 
	WinWait, %title%, 			;等待窗口出来 
	IfWinNotActive, %title%, , WinActivate, %title%, 
	WinWaitActive, %title%, 
   
} 
 
 
 
 
button选择密码文件:  
 
FileSelectFile, SelectedFile, 3, , Open a file, Text Documents (*.txt; *.doc)  
if (SelectedFile = "")  
    MsgBox, The user didn't select anything.  
else  
    MsgBox, The user selected the following:`n%SelectedFile% 
	 
	 
return 
 
 
 
button批量登录网易邮箱: 
 
 
等待窗口出现并将其激活("网易邮箱大师") 
WinMaximize,网易邮箱大师 
 
strings := FileOpen(SelectedFile, "r").Read() 
 
Loop, parse, strings, `n 
{ 
    lines := A_LoopField 
    word_array := StrSplit(lines, A_Tab , ".")  ; 忽略句点.  
    users := word_array[1] 
    pass := word_array[2] 
    ;MsgBox,% word_array[1] 
     
     
    x1 := 39    ;点击设置 
    y1 := 998 
     
    x2 := 201   ;点击邮箱设置 
    y2 := 241 
     
    x3 := 400   ;添加邮箱 
    y3 := 524 
     
     
    Click,%x1%,%y1% 
    Sleep 300 
     
    Click,%x2%,%y2% 
    Sleep 300 
     
    Click,%x3%,%y3% 
    Sleep 300 
     
    SwitchIME(0x04090409)             ;;切换英文输入法 
    Sleep 300 
    send,%users% 
    Sleep 1000 
     
    send,{Tab} 
    Sleep 300 
     
    send,%pass% 
    Sleep 1000 
    send,{Enter} 
    Sleep 1000 
     
} 
 
return 
 
 
button暂停:  
Pause 
 
return 
 
button重启脚本:  
Reload 
 
return 
 
 
 
 
F7:: ;暂停脚本 
Pause 
return 
 
 
F8:: ;重启脚本 
Reload 
return 
 
GuiEscape: 
GuiClose: 
    ExitApp
000 
     
} 
 
return 
 
 
button暂停:  
Pause 
 
return 
 
button重启脚本:  
Reload 
 
return 
 
 
 
 
F7:: ;暂停脚本 
Pause 
return 
 
 
F8:: ;重启脚本 
Reload 
return 
 
GuiEscape: 
GuiClose: 
    ExitApp

猜你喜欢

转载自blog.csdn.net/u014723479/article/details/128460788