chenxu Posted March 12, 2008 Posted March 12, 2008 expandcollapse popupFunc registerId_bug() $winHeigh = 480 $winWidth = 640 $browserHeigh = $winHeigh $browserWidth = $winWidth $btnHeigh = 25 $btnWidth = 80 _IEErrorHandlerRegister () $oIEorg = _IECreateEmbedded () $oIE = $oIEorg $guiHandle = GUICreate("灌水", $winWidth, $winHeigh, _ (@DesktopWidth - $winWidth) / 2, (@DesktopHeight - $winHeigh) / 2, _ $WS_CAPTION + $WS_SYSMENU + $WS_MINIMIZEBOX + $WS_VISIBLE + $WS_CLIPSIBLINGS) $GUIActiveX = GUICtrlCreateObj($oIE, 0, 0, $browserWidth, $browserHeigh) Global $idPre = IniRead(@ScriptDir & "\自动注册.ini", "main", "idPrefix", "error") Global $password = IniRead(@ScriptDir & "\自动注册.ini", "main", "password", "123456") Global $count = IniRead(@ScriptDir & "\自动注册.ini", "main", "count", "-1") $count = $count + 1 IniWrite(@ScriptDir & "\自动注册.ini", "main", "count", $count) ;~ _IENavigate ($oIE, "http://bbs.zhuodou.com/posttopic.aspx?forumid=24") _IENavigate ($oIE, "http://bbs.zhuodou.com/register.aspx?agree=yes") _IELoadWait($oIE) $oForm = _IEFormGetObjByName ($oIE, "form1") $oText = _IEFormElementGetObjByName ($oForm, "username") _IEFormElementSetValue ($oText, $idPre & $count) $oText = _IEFormElementGetObjByName ($oForm, "password") _IEFormElementSetValue ($oText, $password) $oText = _IEFormElementGetObjByName ($oForm, "password2") _IEFormElementSetValue ($oText, $password) $oText = _IEFormElementGetObjByName ($oForm, "email") _IEFormElementSetValue ($oText, $idPre & $count & "@chenxu.com") $oSubmit = _IEGetObjByName ($oIE, "submit") _IEAction ($oSubmit, "click") _IELoadWait($oIE) ;~ _IENavigate ($oIE, "http://bbs.zhuodou.com/register.aspx?agree=yes") ;~ _IELoadWait($oIE) For $i = 1 To 6 _IENavigate ($oIE, "http://bbs.zhuodou.com/buytopic.aspx?topicid=4388&buyit=1") _IELoadWait($oIE) $oForm = _IEFormGetObjByName ($oIE, "form1") $oSubmit = _IEGetObjByName ($oIE, "paysubmit") _IEAction ($oSubmit, "click") _IELoadWait($oIE) Next ;~ $ret = _IEQuit ($oIEorg) EndFunc this code execute with an error, $ret = 1(success), but @error = 2, which not found in the help file The web page I operated can be found in the attachment file.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now