RAMMRODD Posted October 28, 2008 Posted October 28, 2008 ; ******************************************************* ; Example 1 - Open a browser with the form example, set the value of a text form element ; ******************************************************* ; #include <IE.au3> ;$oIE = _IECreate ("http://mobsterstrategy.com/mobadd.php") $oIE = _IE_Example ("FORM") $oForm = _IEFormGetObjByName ($oIE, "ExampleForm") $oText = _IEFormElementGetObjByName ($oForm, "MySpaceID") _IEFormElementSetValue ($oText, "Hey! This works!") This is literally out of the help file with my input "commented out". It may not be proper but it opens the IE browser at goes to the website, but it doesnt fill in the Input box. I viewed the source code and found the input box's "name" but thats not working. Any help would be appreciated. I commented out the line I added so its in its "stock" form except for changing the ID. I want it to go to that website and enter numbers in the input box and submit. Thanks
Valuater Posted October 28, 2008 Posted October 28, 2008 This works... ; ******************************************************* ; Example 1 - Open a browser with the form example, set the value of a text form element ; ******************************************************* ; #include <IE.au3> ;$oIE = _IECreate ("[url="http://mobsterstrategy.com/mobadd.php"]http://mobsterstrategy.com/mobadd.php[/url]") $oIE = _IE_Example ("FORM") $oForm = _IEFormGetObjByName ($oIE, "ExampleForm") $oText = _IEFormElementGetObjByName ($oForm, "textExample") _IEFormElementSetValue ($oText, "Hey! This works!") 8)
Valuater Posted October 29, 2008 Posted October 29, 2008 This will work for your site... ; ******************************************************* ; #include <IE.au3> $oIE = _IECreate ("[url="http://mobsterstrategy.com/mobadd.php"]http://mobsterstrategy.com/mobadd.php[/url]") $oForm = _IEFormGetObjByName ($oIE, "form1") $oText = _IEFormElementGetObjByName ($oForm, "MySpaceID") _IEFormElementSetValue ($oText, "15591113") $oBotton = _IEGetObjByName($oForm, "Submit") _IEAction($oBotton, "click") 8)
RAMMRODD Posted October 29, 2008 Author Posted October 29, 2008 (edited) I'm not home, but thanks for the reply I'll test it then. EDIT: That didnt work...I probably found the wrong name of the box....how do I do that? Or can someone double check for me either way is great. My way was just with the HTML source.... Edited October 29, 2008 by RAMMRODD
Valuater Posted October 30, 2008 Posted October 30, 2008 (edited) I tested that code ( my code above )... it works 8) Edited October 30, 2008 by Valuater
RAMMRODD Posted October 30, 2008 Author Posted October 30, 2008 so you run the script and it goes to the site enters in the numbers and submits it? When i try it it opens up 2 IE windows maximizes 1 of them goes to the site, and then nothing....Did I run it wrong?
DaleHohm Posted October 31, 2008 Posted October 31, 2008 Vista perchance? Please see the remarks for _IECreate in the helpfile. 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
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