xerxes717 Posted December 3, 2006 Posted December 3, 2006 Hi all, this is my first post here and I have a really basic question: How can I set the value of a text field inside a form in IE when the form doesn't have a name? Let's say the text field whose value I'm trying to set it is called "textField". My code is as follows: #include <IE.au3> $oIE = _IECreate("http://www.something.com",0,1,1,0) $oForm = _IEGetObjByName($oIE, "textField") $oForm.value = "Set this text in the text field" _IEFormSubmit ($oForm) What am I doing wrong? This code just opens the browser with the correct URL and then appears to hang (the script appears to still be running, or paused rather as indicated by the Autoit icon in the system tray). Thanks in advance! PS - I'm using IE7, Autoit Beta and Scite
xerxes717 Posted December 3, 2006 Author Posted December 3, 2006 (edited) I think i figured out the solution myself - I had set the window to finish loading before setting the text field and for some reason the script never figured out when the page had finished loading. That's why it never went any further in the script. When I changed the _IECreate function to not wait to load, the text field starting being set correctly. Thanks. Edited December 3, 2006 by xerxes717
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