Manic Posted June 28, 2011 Posted June 28, 2011 Hey there!I'm having trouble having my script click the submit image of this form. Can anyone see where I went wrong?$oUsername = "test" $oPassword = "abc123" $oIE = _IECreate("http://www.FAKESITE.com") $oLoginForm = _IEFormGetObjByName ($oIE, "navbar_loginform") $oQuery = _IEFormElementGetObjByName ($oLoginForm, "vb_login_username") ; Find the username field _IEFormElementSetValue ($oQuery, $oUsername, "byText") ;Set username $oQuery = _IEFormElementGetObjByName ($oLoginForm, "vb_login_password") ; Find the password field _IEFormElementSetValue ($oQuery, $oPassword, "byText") ;Set password $oCheckbox = _IEFormElementGetObjByName($oLoginForm, "cookieuser"); Find the checkbox option $oCheckbox.checked = True; check it _IEFormImageClick ($oLoginForm, "images/styles/GamerBlue/style/loginButton.gif", "src") ;submit account infoHTML<form id="navbar_loginform" action="login.php?do=login" method="post" onsubmit="md5hash(vb_login_password, vb_login_md5password, vb_login_md5password_utf, 0)"><div class="loginBoxInput"><input type="text" class="loginInput" name="vb_login_username" id="navbar_username" size="10" accesskey="u" tabindex="101" value="User Name"></div><div class="loginBoxInput"><input type="password" class="loginInput" tabindex="102" name="vb_login_password" id="navbar_password" size="10" style="display: none; "><input type="text" class="loginInput" tabindex="102" name="vb_login_password_hint" id="navbar_password_hint" size="10" value="Password" style="display: inline; "></div><input type="checkbox" name="cookieuser" value="1" id="cb_cookieuser_navbar" class="cb_cookieuser_navbar" accesskey="c" tabindex="103"><input type="image" src="images/styles/GamerBlue/style/loginButton.gif" tabindex="104" value="Log in" title="Enter your username and password in the boxes provided to login, or click the 'register' button to create a profile for yourself." accesskey="s">Oddly enough, I had it working before, but I think I might have accidentally changed something. Thank you for your time!Manic
DaleHohm Posted June 28, 2011 Posted June 28, 2011 Did you recently upgrade to IE9 perhaps? If so, make certain 1) you use the latest AutoIt beta version 2) if 1 doesn't work, try putting the page in compatability mode Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble
Manic Posted June 28, 2011 Author Posted June 28, 2011 Hey Dale, I fixed it! I think it had to do with cookies. Thank you!
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