Regency Posted June 12, 2009 Posted June 12, 2009 Ok, so this script works by itself, and does exactly what i want. but id there a way to make it open again, like, after i click start, it uses the info in the input and adds it to the field in the ie window, and reloads the img in the ie embedded for the next page i want. Like.. expandcollapse popup#include <GUIConstantsEx.au3> #include <IE.au3> #include <WindowsConstants.au3> Y Global $Url = "tmnx.net" Global $A1 = "" Global $P1 = "" Global $tmnx = "" Global $name1 = "" $Tmnx = _iecreate($Url,0,1,1,0) _IELoadWait($Tmnx) _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () GUICreate("Embedded Web control Test", 450, 300, _ (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, _ $WS_OVERLAPPEDWINDOW + $WS_VISIBLE + $WS_CLIPSIBLINGS) $Desired = GUICtrlCreateGroup("Enter Captcha Answer",8,225,425,49) $username = GUICtrlCreateInput("", 16, 241, 114, 21) $savename = GUICtrlCreateButton("Save", 168, 241, 75, 25, 0) GUICtrlCreateGroup("", -99, -99, 1, 1) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 10, 400, 200) $User = GUICtrlCreateLabel("", 8, 352, 250, 17) ; This is $Make = GUICtrlCreateButton("Start", 300, 241, 75, 25, 0) GUISetState() ;Show GUI $oImg = _IEImgGetCollection($Tmnx,0) $sInfo = $oImg.src _IENavigate ($oIE,$oimg.src) While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $savename $name1 = GUICtrlRead($username) GUICtrlSetData($User, $name1) Case $msg Relog() GUIDelete() Exit EndSelect WEnd Func Relog() $oUser = _IEGetObjByName($Tmnx, "txtUsername") _IEFormElementSetValue($oUser, $A1) $oPass = _IEGetObjByName($Tmnx, "txtPassword") _IEFormElementSetValue($oPass, $P1) $oCap = _IEGetObjByName($Tmnx, "recaptcha_response_field") _IEFormElementSetValue($oCap, $name1) $oLogIn = _IEGetObjByName($Tmnx, "btnlogin") ;_IEAction($oLogIn, "click") EndFunc The msg box's are where the GUI should be.. Anyone have any ideas on the best way to go about this?
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