本帖最后由 xlj310 于 2015-12-1 11:11 编辑
楼主对Au3还不是很了解,不过你这样去做说明你还是有足够耐心的,我下载了foxmail7.0版本,帮你做了一个现成的脚本,可以直接拿来使用,个中函数你就自己慢慢学习吧。选中函数后直接按F1会跳出对应函数的使用方法。
Run("D:\Program Files\Foxmail 7.0\Foxmail.exe")
;解决Foxmail最小化后不能识别到窗口
WinSetState("Foxmail","",@SW_RESTORE)
WinWait("Foxmail", "")
WinActivate("Foxmail", "")
$title = "帐号管理"
$text = "确定"
If WinExists($title,$text) Then WinClose($title,$text)
;需要模拟发送按键,临时禁用键鼠操作
BlockInput(1)
Do
Send("!tc")
Until WinExists($title, $text)
;操作完毕,解禁键鼠锁定
BlockInput(0)
;~ WinActivate("帐号管理", "更改(&E)")
$Control = "TTntEdit.UnicodeClass3"
$EmailAddress = ControlGetText($title, $text, $Control)
$EmailAddress = StringReplace($EmailAddress, "shentongxm.com", "shentong.com")
ControlSetText($title, $text, $Control, $EmailAddress)
Do
ControlClick($title, $text, "TTntTabControl.UnicodeClass1", "", 1, 172, 10)
Until WinExists($title, "发送服务器需要身份验证")
ControlSetText($title, $text, $Control, $EmailAddress)
;下面代码修改密码,为防止误修改,已将下行代码作注释了,如果确实需要,请把前面的注释符去掉
;~ ControlSetText($title, $text, "TTntEdit.UnicodeClass2", "mail.shentong.com");密码框
ControlSetText($title, $text, "TTntEdit.UnicodeClass4", "smtp.shentong.com");发送服务器
ControlSetText($title, $text, "TTntEdit.UnicodeClass1", "pop3.shentong.com");接收服务器
Do
ControlClick($title, $text, "TTntTabControl.UnicodeClass1", "", 1, 273, 10)
Until WinExists($title, "发送邮件时拆分邮件")
ControlSetText($title, $text, "TTntEdit.UnicodeClass4", $EmailAddress)
;下面代码使修改生效,建议先看一下效果,如果没有问题,可以继续
;~ ControlClick($title,$text,"TTntButton.UnicodeClass15");点击确定按钮
|