kiu Posted January 16, 2010 Share Posted January 16, 2010 Hi I'm trying to click a button wich controls a form. I have an embedded IE I think the html source for my button is <INPUT class=button2 value=Dificil type=submit name=dif3> I use this to get informations about my button, $oInputs = _IETagNameGetCollection ($oIE, "input") $x = 0 For $oInput In $oInputs MsgBox(0, "Form Input Type", "x = " & $x & "Form: " & $oInput.form.name & " Type: " & $oInput.type & " html: " & $oInput.outerhtml) $x += 1 Next but I don'n know how to activate it; I have tried with $oForm = _IEFormGetCollection($oIE, 3) _IEFormSubmit ($oForm) but I don't know how to use _IEFormGetCollection here. If you can give me an example, or advice, I will bw very pleased. ps: sorry for my englih Paul Link to comment Share on other sites More sharing options...
BrettF Posted January 16, 2010 Share Posted January 16, 2010 Are there any errors? Is there any more code? What are you attempting to automate? I assume you probably don't have SciTe- look for the link in my sig. Cheers, Brett Oh and welcome to the forums btw. Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
kiu Posted January 16, 2010 Author Share Posted January 16, 2010 I want to autologin in this site:My SiteI try to fill the login form and activate Login buttonI started to code a bot, and I can't activate any of that kind of button, like that in Login formThe code from my bot is big, and you can't use it if you don't have an account to that web-game.I can activate some buttons inside the site using _IENavigate($oIE, $url, 0) $oForm = _IEFormGetCollection($oIE, 3) _IEFormSubmit($oForm)I just discovered that using 3 in _IEFormGetCollection($oIE, 3) work, Link to comment Share on other sites More sharing options...
kiu Posted January 17, 2010 Author Share Posted January 17, 2010 I tried something like this #include <IE.au3> $oIE = _IECreate() _IENavigate($oIE, "http://s1.bitefight.de/bite/login.php") $o_form = _IEFormGetObjByName($oIE, "l") $o_login = _IEFormElementGetObjByName($o_form, "user") $o_password = _IEFormElementGetObjByName($o_form, "pass") _IEFormElementSetValue($o_login, "username") _IEFormElementSetValue($o_password, "password") _IEFormSubmit($o_form) Exit but didn't succeed Link to comment Share on other sites More sharing options...
Consty Posted February 7, 2010 Share Posted February 7, 2010 *bump* I am having troubles here as well. Problem is that the form has no name?! what do you do in this case? example: #include <IE.au3> $oIE = _IECreate ("http://www.google.com") $oForm = _IEFormGetObjByName ($oIE, "f") $oQuery = _IEFormElementGetObjByName ($oForm, "q") _IEFormElementSetValue ($oQuery, "AutoIt IE.au3") _IEFormSubmit ($oForm) _IEFormGetObjByName doesn't work because the form here has no name. "Error from function _IEFormElementGetObjByName, $_IEStatus_InvalidDataType" nothing i can do any ideas? Link to comment Share on other sites More sharing options...
Consty Posted February 9, 2010 Share Posted February 9, 2010 *bump* still need help here Link to comment Share on other sites More sharing options...
DaleHohm Posted February 9, 2010 Share Posted February 9, 2010 @kiu please read the remarks section of _IEFormSubmit in the helpfile @Consty I don't know where to begin... pile onto someone elses thread with a new question and then bump it? get real - open your own thread, but first spend some time in the helpfile... read the remarks for _IEFormElementGetObjByName and examine all of the console output in SciTe for clues 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...
KonnectTest Posted February 9, 2010 Share Posted February 9, 2010 You could always send tabs till you get to the fields, populate them, tab to the submit button and hit "enter". This is definitely an ugly solution but it works! 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