jokke Posted October 4, 2006 Share Posted October 4, 2006 (edited) Hi, Dont know exactly where to start, im trying to fill inn a IEform, but i cant seem to hook into it. #include <IE.au3> $oIE = _IECreate ("myformspagehere") $oForm = _IEFormGetObjByName ($oIE, "0") $osignin = _IEFormElementGetObjByName ($oform, "submit") _IEAction ($osignin, "click") As you can see the form im trying to fill is named nothing/0. I'we tried to find the form name with this code: ; ******************************************************* ; Example 1 - Open a browser with the form example, get the collection ; of all INPUT tags and display the formname and type of each ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("myformspagehere") $oForms = _IEFormGetCollection ($oIE) MsgBox(0, "Forms Info", "There are " & @extended & " forms on this page") For $oForm In $oForms MsgBox(0, "Form Info", $oForm.name) Next But this only tells me "0". Here are some HTML code from the form im trying to hook: <FORM action="index.php?side=test" method="POST"> <td> <tr> <td><input type="text" name="valg" value="Your text here1"></td> </tr> </td> <input name="submit" type=submit value="Utfør!"> Anyone have any good idea how i can hook into the form? Or any other way to approach this? All help appreciated Edited October 4, 2006 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
DaleHohm Posted October 4, 2006 Share Posted October 4, 2006 The form has no name so you need to use _IEFormGetCollection and the appropriate zero-based index value. 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...
jokke Posted October 5, 2006 Author Share Posted October 5, 2006 Thanks alot, i where able to do it now here is some code i used: Func _myfunc() _IENavigate ($oIE, "myformspagehere") $oForm = _IEFormGetCollection ($oIE, 0) _IEFormElementRadioSelect ($oForm, "radio1", "valg", 1, "byValue") $submit = _IEFormElementGetObjByName ($oform, "bekreftkrimsubmit") _IEAction ($submit, "click") EndFunc UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. 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