lss33333 发表于 2011-8-14 19:00

申请NOD32官方_ID30(天)页面时AU3自动填写邮箱的问题

本帖最后由 lsszmj 于 2011-8-15 01:51 编辑

我已有邮箱:8888@163.COM
我想在如下页面中用_IE用户自定义函数自动填写邮箱一直没成功,请提供帮助,谢谢

http://sky123.org/data/attachment/forum/201108/14/184449im5zdxyire7ozxon.jpg.thumb.jpg
29 秒前 上传
下载附件 (39 KB)






网址:http://www.eset.eu/download/ess-trial-form.
我是才学的。再次谢谢各位!

bdrdc 发表于 2011-8-14 21:07

;------------开始获取临ESET30天ID--------------------
;$temp_Email = "hjj31111com"
$oIE = _IECreate ("http://www.eset.eu/download/ess-trial-form", 0, 0,1,0)
$T = _IEDocReadHTML($oIE)
; MsgBox(64, $oIE,StringInStr($T, "Trial Version" ))
If StringInStr($T, "Trial Version") = 0 Then
        TrayTip("发现错误", "无法连接到ESET30天ID申请页面!"& @CRLF & "3秒后退出", 25, 3)
        FileWriteLine($file_ok, "【"& _Now() & "】"& "发现错误,程序无法连接到ESET Trial 30天ID申请页面!" & @CRLF)
        RegWrite("HKEY_CLASSES_ROOT\http\shell\open\command", "", "REG_SZ", $browser_old)
        FileWriteLine($file_ok, "【"& _Now() & "】"& "本机默认浏览器程序恢复为" & $browser_old & @CRLF)
        FileWriteLine($file_ok, "【"& _Now() & "】"& "程序运行结束" & @CRLF)
        FileWriteLine($file_ok, "*********************************************************")
        FileClose($file_ok)
        sleep(2000)
        ;_IEQuit ($oIE)
        _IEQuit ($oIE1)
        Exit
EndIf


$oFrames = _IEFrameGetCollection ($oIE)
;MsgBox(64, $oFrames,@ERROR)
if $oFrames=0 Or @ERRORthen
        TrayTip("发现错误", "程序无法得到ESET Trial 30天ID申请页面内嵌框架!,3秒后退出", 5, 3)
        FileWriteLine($file_ok, "【"& _Now() & "】"& "发现错误,程序无法得到ESET Trial 30天ID申请页面内嵌框架!" & @CRLF)
                RegWrite("HKEY_CLASSES_ROOT\http\shell\open\command", "", "REG_SZ", $browser_old)
                FileWriteLine($file_ok, "【"& _Now() & "】"& "本机默认浏览器程序恢复为" & $browser_old & @CRLF)
                FileWriteLine($file_ok, "【"& _Now() & "】"& "程序运行结束" & @CRLF)
                FileWriteLine($file_ok, "*********************************************************")
                FileClose($file_ok)
                sleep(2000)
                _IEQuit ($oIE)
                _IEQuit ($oIE1)
                Exit
EndIf

$iNumFrames = @extended
For $i = 0 to ($iNumFrames - 1)
    $oFrame = _IEFrameGetCollection ($oIE, $i)
   ; MsgBox(0, "Frame Info", _IEPropertyGet ($oFrame, "locationurl"))
Next

;_IEQuit ($oIE)
;TrayTip("【精睿·网络安全】", "得到申请ID页面内置框架地址:"& _IEPropertyGet ($oFrame, "locationurl") , 5, 1)
;-------------正在打开内嵌框架网页---------------------
TrayTip("【精睿·网络安全】", "正在提交给ESET.... ", 35, 1)
FileWriteLine($file_ok, "【"& _Now() & "】"& "得到申请ID页面内置框架地址,正在打开页面并提交数据..."& @CRLF)
$oIE = _IECreate (_IEPropertyGet ($oFrame, "locationurl"), 0, 0,1,0)
$T = _IEBodyReadText($oIE)
;MsgBox(64, $oIE,$T)
;MsgBox(64, $oIE,StringInStr($T, "Email.:" ))
If StringInStr($T, "Email.:") = 0 Then
;if @ERRORthen
        TrayTip("错误", "无法连接到ESET Trial 30天ID内嵌申请页面!,3秒后退出", 5, 3)
        FileWriteLine($file_ok, "【"& _Now() & "】"& "错误,无法连接到ESET Trail 30天ID内嵌申请页面!" & @CRLF)
                RegWrite("HKEY_CLASSES_ROOT\http\shell\open\command", "", "REG_SZ", $browser_old)
                FileWriteLine($file_ok, "【"& _Now() & "】"& "本机默认浏览器程序恢复为" & $browser_old & @CRLF)
                FileWriteLine($file_ok, "【"& _Now() & "】"& "程序运行结束" & @CRLF)
                FileWriteLine($file_ok, "*********************************************************")
                FileClose($file_ok)
                sleep(2000)
                _IEQuit ($oIE)
                _IEQuit ($oIE1)
                Run("notepad.exe ESET_30天临时ID.txt")
                Exit
EndIf

$oForms = _IEFormGetCollection ($oIE)
$iNumForms = @extended
;MsgBox(0, "Forms Info", "There are " & $iNumForms & " forms on this page")

;-------------得到表单名称---------------------
For $i = 0 to $iNumForms - 1
    $oForm = _IEFormGetCollection ($oIE, $i)
    ;MsgBox(0, "Form Info", $oForm.name)
Next

;-------------从表单遍历表单元素---------------------
$oForm = _IEFormGetObjByName ($oIE, $oForm.name)
$oQuerys = _IEFormElementGetCollection ($oForm)
For $Query In $oQuerys
TrayTip("表单控件信息", "名称:"& $Query.name & " 类型:"&$Query.type,3,1)
;FileWriteLine($file_ok, "【"& _Now() & "】"& "表单控件信息:名称:"& $Query.name & " 类型:"&$Query.type & @CRLF)

;-------------如果元素类型为“Text”,则填入临时邮件地址---------------------
If $Query.type = "Text" then
$oText = _IEFormElementGetObjByName ($oForm, $Query.name)
_IEFormElementSetValue ($oText, $temp_Email)
EndIf

;-------------如果元素类型为“submit”,则将此元素名称付给$submit_name,以便提交表单--------------------
If $Query.type = "submit" then $submit_name=$Query.name
Next

;-------------提交表单--------------------
;_IEAction ($oForm, "click")
$OK = _IEGetObjByID($oIE, $submit_name);通过工具查询到得登陆按钮ID值
$OK.click ;点击提交按钮

TrayTip("【精睿·网络安全】", "提交完毕,正在等待ESET回复....", 35, 1)

lss33333 发表于 2011-8-14 21:55

谢谢B版,真诚感谢!马上测试,

lss33333 发表于 2011-8-15 01:55

搞到这个时候,已经会能实现申请临时邮箱后发送到ESET网站了,然后就不晓得怎样打开临时邮箱中收到的ID信件了

lss33333 发表于 2011-8-15 01:56

请B版给点提示,谢谢
页: [1]
查看完整版本: 申请NOD32官方_ID30(天)页面时AU3自动填写邮箱的问题