AcidCorps Posted September 25, 2008 Share Posted September 25, 2008 Ok so I have the following script: #include <IE.au3> $User = 'USERNAME' $State = 'STATE' ; 2 charactors such as MA $Pass = 'Password' $oIE = _IECreate('https://www.bankofamerica.com/index.jsp',0,1) $oForm = _IEFormGetCollection($oIE, 1) $oUser = _IEFormElementGetCollection($oForm, 13) $oState = _IEFormElementGetCollection($oForm, 15) _IEFormElementSetValue($oUser, $User) _IEFormElementSetValue($oState, $State) _IEFormSubmit($oForm) $oPass = _IEFormElementGetCollection($oForm, 2) _IEFormElementSetValue($oPass, $Pass) _IEFormSubmit($oForm) but for some reason when it submits the first form it doesn't read the user correctly because it brings me to another page that says I did not enter an Online ID does anybody have any ideas, it shows up in the input box before I submit - AcidCorps Link to comment Share on other sites More sharing options...
TerarinK Posted September 25, 2008 Share Posted September 25, 2008 (edited) This doesn't work because you have two forms and your telling it to Submit the first one. The best way to fix this problem is: $oElements = _IETagNameAllGetCollection($oIE) For $oElement In $oElements If StringInStr($oElement.tagname, "Input") Then If StringInStr($oElement.type, "Submit") And StringInStr($oElement.value, "WHATEVER IS ON THE LOGIN") Then $oLogin = $oElement EndIf EndIf Next Then you can just _IEAction($oLogin, "click") it Edited September 25, 2008 by TerarinK 0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E Link to comment Share on other sites More sharing options...
AcidCorps Posted September 26, 2008 Author Share Posted September 26, 2008 heh yea I guess I wasn't quite reading it well, thanks for the help TerarinK Link to comment Share on other sites More sharing options...
AcidCorps Posted September 26, 2008 Author Share Posted September 26, 2008 Ok I'm still having issue's here: #include <IE.au3> $User = 'USERNAME' $State = 'STATE' ; 2 charactors such as MA $Pass = 'PASSWORD' $oIE = _IECreate('https://www.bankofamerica.com/index.jsp',0,1) $oForm = _IEFormGetCollection($oIE, 1) $oUser = _IEFormElementGetCollection($oForm, 13) $oState = _IEFormElementGetCollection($oForm, 15) _IEFormElementSetValue($oUser, $User) _IEFormElementSetValue($oState, $State) _IESubmit($oForm) If I use this script it simply fills out the form and doesn't submit it this is really getting on my nerves here as I'm at a complete road stop and can't think of anything else to try Link to comment Share on other sites More sharing options...
HighlanderSword Posted October 28, 2008 Share Posted October 28, 2008 Ok I'm still having issue's here: #include <IE.au3> $User = 'USERNAME' $State = 'STATE' ; 2 charactors such as MA $Pass = 'PASSWORD' $oIE = _IECreate('https://www.bankofamerica.com/index.jsp',0,1) $oForm = _IEFormGetCollection($oIE, 1) $oUser = _IEFormElementGetCollection($oForm, 13) $oState = _IEFormElementGetCollection($oForm, 15) _IEFormElementSetValue($oUser, $User) _IEFormElementSetValue($oState, $State) _IESubmit($oForm) If I use this script it simply fills out the form and doesn't submit it this is really getting on my nerves here as I'm at a complete road stop and can't think of anything else to try Link to comment Share on other sites More sharing options...
Gillboss Posted October 28, 2008 Share Posted October 28, 2008 the requireadmin, is because i use vista.. any way, u just need the form name and its very help you.. the form name is: frmSignIn enjoy #RequireAdmin #include <IE.au3> $User = 'USERNAME' $State = 'NY' ; 2 charactors such as MA $oIE = _IECreate('https://www.bankofamerica.com/index.jsp',0,1) $oForm = _IEFormGetObjByName($oIE, 'frmSignIn') $oUser = _IEFormElementGetObjByName($oForm, 'id') $oState = _IEFormElementGetObjByName($oForm, 'state') _IEFormElementSetValue($oUser, $User) _IEFormElementSetValue($oState, $State) _IEFormSubmit ($oForm) Link to comment Share on other sites More sharing options...
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