设计打开多个链接脚本时网页不能登陆自动提交请高手指正
#include <GUIConstants.au3>#include <IE.au3>
$Form1 = GUICreate("如何同时打开多个链接脚本", 336, 225, 266, 170)
$Label1 = GUICtrlCreateLabel("邮箱", 40, 56, 42, 23)
GUICtrlSetFont(-1, 14, 400, 0, "宋体")
$Mail= GUICtrlCreateInput("xxxx@xxx.com", 88, 56, 129, 21)
$oSubmit = GUICtrlCreateButton("确认", 88, 128, 113, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$List = FileOpen ("123.txt",0)
$line=_FileCountLinesEx($List)
Func _FileCountLinesEx($sFilePath)
Local $iCountLines = 0
Local $sFRead = FileRead($sFilePath)
If @error = -1 Then Return SetError(1, 0, 0)
If @error <> 0 Then Return SetError(2, 0, 0)
$sFRead = StringReplace($sFRead, @CRLF, "")
$iCountLines += @extended
$sFRead = StringReplace($sFRead, @CR, "")
$iCountLines += @extended
StringReplace($sFRead, @LF, "")
$iCountLines += @extended
Return $iCountLines + 1
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
For $i = 1 To $Line
$oIE = _IECreate()
$Url = FileReadLine($List,$i)
_IENavigate($oIE,$Url)
$oUser = _IEGetObjByName($oIE,$Mail)
$oSubmit= _IEGetObjById($oIE,"Ga Verde")
_IEFormElementSetValue($oUser,$Mail)
_IEAction($oSubmit,"Ga Verde")
next
Case $GUI_EVENT_CLOSE
Exit
Exit
EndSwitch
WEnd
如果你测试的话 请建个123.txt的记事本
请加3个链接 http://www.fasteuro.nl/pages/confirm.php
http://www.8euromail.nl/pages/confirm.php
http://www.moneyplace.nl/pages/confirm.php
没有病毒的 请放心
我测试的时候不能打开网站也不能确定提交
还有个问题 如果没隔2秒注册一个网页还应如何设置
朋友们帮个忙呀
[ 本帖最后由 xptool 于 2008-11-18 16:17 编辑 ] 貌似在你另外一个帖子里面
我已经给出解决代码了.. 感谢真会走路的废柴应用到脚本里网页无法打开
也不能登录
帮我检查一下错在哪里好吗 我想实现的功能是在设计的程序中输入邮箱名字 点确定后记事本中的链接挨个打开,自动填名字 自动登陆 我写一个骨架,你自己把具体写好...
多问是好,但不是在自己没怎么看帮助的情况下而不停的问,那样就算帮你写了,你也不懂...
#include <GUIConstants.au3>
#include <IE.au3>
$Form1 = GUICreate("如何同时打开多个链接脚本", 336, 225, 266, 170)
$Label1 = GUICtrlCreateLabel("邮箱", 40, 56, 42, 23)
GUICtrlSetFont(-1, 14, 400, 0, "宋体")
$Mail= GUICtrlCreateInput("xxxx@xxx.com", 88, 56, 129, 21)
$Submit = GUICtrlCreateButton("确认", 88, 128, 113, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
$List = FileOpen ("123.txt",0)
$line=_FileCountLinesEx($List)
Func _FileCountLinesEx($sFilePath)
Local $iCountLines = 0
Local $sFRead = FileRead($sFilePath)
If @error = -1 Then Return SetError(1, 0, 0)
If @error <> 0 Then Return SetError(2, 0, 0)
$sFRead = StringReplace($sFRead, @CRLF, "")
$iCountLines += @extended
$sFRead = StringReplace($sFRead, @CR, "")
$iCountLines += @extended
StringReplace($sFRead, @LF, "")
$iCountLines += @extended
Return $iCountLines + 1
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $Submit
For $i = 1 To $Line
$oIE = _IECreate()
$Url = FileReadLine($List,$i)
_IENavigate($oIE,$Url)
$oUser = _IEGetObjByName($oIE, $nameset)
If IsObj($oUser) Then $oUser.value = $Mail
$opassword = _IEGetObjById($oIE, $passwordset)
If IsObj($opassword) Then $opassword.value = $password
$oSubmit = _IEGetObjById($oIE, $Submitset)
_IEAction($oSubmit,"click")
next
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
页:
[1]