|
本帖最后由 papapa314 于 2011-1-19 21:16 编辑
首先感谢smartzbs,帮助我把vbs转成了au3,我用自己的方法也解决了用户名中文出现乱码的问题,可是程序运行一次就死掉了,得重开才能再用,请教高手如何解决?
代码如下
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 623, 442, 192, 124)
$Input1 = GUICtrlCreateInput("", 152, 168, 193, 21)
$Input2 = GUICtrlCreateInput("", 152, 224, 193, 21,$ES_PASSWORD)
#include <IE.au3>
GUISetState(@SW_SHOW)
$Button1 = GUICtrlCreateButton("Button1", 168, 304, 161, 41)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
MsgBox(0,"",GUICtrlRead($Input2))
$sUrl = "https://login.taobao.com/member/login.jhtml?redirect_url="
$oIE = _IECreate($sUrl)
$oForm = _IEFormGetCollection ($oIE, 0)
$oQuery = _IEFormElementGetCollection ($oForm, 0)
_IEFormElementSetValue ($oQuery, GUICtrlRead($Input1))
$oQuery = _IEFormElementGetCollection ($oForm, 1)
_IEFormElementSetValue ($oQuery,GUICtrlRead($Input2) )
_IEFormSubmit($oForm)
EndSwitch
WEnd |
|