pileot Posted January 24, 2008 Share Posted January 24, 2008 (edited) Ok original issue got fixed with some tweaking, but now im trying to apply working with IE forms on pages that have frames. How do i specify what frame to use? Edited January 25, 2008 by pileot Link to comment Share on other sites More sharing options...
Regency Posted January 24, 2008 Share Posted January 24, 2008 This should work as the login feature. $oUser = _IEGetObjByName($oIE, "Username") _IEFormElementSetValue($oUser, $username) $oPass = _IEGetObjByName($oIE, "Password") _IEFormElementSetValue($oPass, $password) $oLogIn = _IEGetObjByName($oIE, "Action") _IEAction($oLogIn, "click") _IELoadWait($oIE) Link to comment Share on other sites More sharing options...
pileot Posted January 24, 2008 Author Share Posted January 24, 2008 (edited) Strange, it will type everything in, and acts like it clicks "Enter lol!" as it should, but then it goes to the main screen again... #include <IE.au3> $username = "******" $password = "*******" $oIE = _IECreate ("http://www.lordsoflords.com/meadow2/login.php") _IELoadWait ($oIE) $oForm = _IEFormGetCollection ($oIE, 1) $oUsername = _IEFormElementGetObjByName ($oForm, "UserName") $oPassword = _IEFormElementGetObjByName ($oForm, "Password") _IEFormElementSetValue ($oUsername, $username) _IEFormElementSetValue ($oPassword, $password) sleep(3000) $oLogIn = _IEGetObjByName($oIE, "Action") _IEAction($oLogIn, "click") _IELoadWait($oIE) if i click enter before the auto click kicks in, i can log in, otherwise it doesnt work... ideas? Edited January 24, 2008 by pileot Link to comment Share on other sites More sharing options...
Swift Posted January 24, 2008 Share Posted January 24, 2008 KeeForm is a great program to login to websites....have a check with the PassSecure topic...it has a KeeForm login bot...you can set a script to run it...with the acct pw...and website...and it does the rest. Link to comment Share on other sites More sharing options...
DaleHohm Posted January 24, 2008 Share Posted January 24, 2008 Strange, it will type everything in, and acts like it clicks "Enter lol!" as it should, but then it goes to the main screen again... #include <IE.au3> $username = "******" $password = "*******" $oIE = _IECreate ("http://www.lordsoflords.com/meadow2/login.php") _IELoadWait ($oIE) $oForm = _IEFormGetCollection ($oIE, 1) $oUsername = _IEFormElementGetObjByName ($oForm, "UserName") $oPassword = _IEFormElementGetObjByName ($oForm, "Password") _IEFormElementSetValue ($oUsername, $username) _IEFormElementSetValue ($oPassword, $password) sleep(3000) $oLogIn = _IEGetObjByName($oIE, "Action") _IEAction($oLogIn, "click") _IELoadWait($oIE) if i click enter before the auto click kicks in, i can log in, otherwise it doesnt work... ideas?Cute... there are two forms on that page and each has Username, Password and Action elements. You are entering username and password into form 1 and you are clicking the Action button in form 0 (since it is listed first). Several ways to tackle this... one is $oLogIn = _IEFormElementGetObjByName($oForm, "Action") Dale P.S. DebugBar made figuring this out very simple 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 Link to comment Share on other sites More sharing options...
Regency Posted January 24, 2008 Share Posted January 24, 2008 Cute... there are two forms on that page and each has Username, Password and Action elements. You are entering username and password into form 1 and you are clicking the Action button in form 0 (since it is listed first).Several ways to tackle this... one is $oLogIn = _IEFormElementGetObjByName($oForm, "Action")DaleP.S. DebugBar made figuring this out very simpleIn writting my response i used the amazing tool, DebugBar,Didnt notice the forms you stated. That was a over sight on my part while trying to help him. Link to comment Share on other sites More sharing options...
DaleHohm Posted January 24, 2008 Share Posted January 24, 2008 In writting my response i used the amazing tool, DebugBar,Didnt notice the forms you stated. That was a over sight on my part while trying to help him.No problem - I didn't see it right away either. When I realized it wasn't making sense I looked at the section on the left -- we usually focus on the Document section, but there are alos sections for Links, Images, Forms, Scripts and Style Sheets.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 Link to comment Share on other sites More sharing options...
Regency Posted January 24, 2008 Share Posted January 24, 2008 No problem - I didn't see it right away either. When I realized it wasn't making sense I looked at the section on the left -- we usually focus on the Document section, but there are alos sections for Links, Images, Forms, Scripts and Style Sheets.DaleAHH, didnt even check the script i just wrote it with out testing it or i prob would have ben fustrated and figured it out lol. 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