Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

How to get the current URL in the new page & set value in the new page?

$
0
0
First I use _IECreate & _IEGetObjByName can be successful to set value in the 1st page, but when I sign in to the 2nd page how I could get the URL of the 2nd page and set value in the 2nd page?
Very Thankful for answering my question...
Test ID&PWD (just paste in the GUI)>>> 859839017,ALD25242
Elson

Here is my code.
[ autoit ]         
#include <IE.au3> #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form= $S_QQ = GUICreate("Input ID & PWD", 226, 87, 586, 344) $Bottle = GUICtrlCreateInput("", 64, 16, 145, 21) $L_Bottle = GUICtrlCreateLabel("ID & PWD"&@CRLF&"EXP:859839017,ALD25242", 24, 16, 36, 17) $S_Bottle = GUICtrlCreateButton("Sign", 128, 48, 75, 25) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### Global $pwd_url = "http://x.co/sj88" While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $S_Bottle If GUICtrlRead($Bottle) <> "" Then signbottle() Else MsgBox(16,"","Non-empty") EndIf EndSwitch WEnd Func signbottle() Local $aID0 = StringRegExp(GUICtrlRead($Bottle), "[0-9]{6,12}", 3) Local $aID00 = StringRegExp(GUICtrlRead($Bottle), ",([0-9,a-z,A-Z]{8})", 3) Global $oIE= _IECreate($pwd_url) _IELoadWait($oIE) $oFrameTag = _IEGetObjByName($oIE, "login_frame") _IEAction($oFrameTag, "focus") Send("{TAB}") Send($aID0[0]) Send("{TAB}") Send($aID00[0]) Send("{ENTER}") While 1 $url = _IEPropertyGet($oIE, "locationurl") If $url <> $pwd_url Then ExitLoop EndIf Wend ;;;;;In this line, I want to get the new URL $psw_old = _IEGetObjById($oIE2, "psw_old") _IEFormElementSetValue($psw_old,$aID00[0]) ;>>set value in this new page EndFunc

:) :) :)

Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>