pallavi Posted February 24, 2009 Posted February 24, 2009 Hello All, I have been trieng to write a sample code to handle websites.. i can run successfully that in explorer 6. but not in explorer 7.. here i mentiond sample script: #include <IE.au3> #include <Array.au3> #include <Constants.au3> $oIE = _IECreate ("http://www.smsc11.com/corp/corporate/entry.jsp"); _IELoadWait ($oIE) WinActivate("WAY2SMS Corporate Login") WinSetState("WAY2SMS Corporate Login","",@SW_MAXIMIZE); controlEnable ("WAY2SMS Corporate Login", "", "userid" ) ControlFocus ("WAY2SMS Corporate Login", "", "userid" ); $o_object = _IEGetObjById ( $oIE, "userid"); _IEDocInsertText ( $o_object, "ABC"); Sleep(100) $o_object = _IEGetObjByName ( $oIE, "pass"); _IEDocInsertText ( $o_object, "xyz"); Sleep(100) With thanks & regards, Pallavi
exodius Posted February 24, 2009 Posted February 24, 2009 (edited) How about this instead?#include <IE.au3> $oIE = _IECreate ("http://www.smsc11.com/corp/corporate/entry.jsp"); $oUser = _IEGetObjByName ($oIE, "userid") $oPass = _IEGetObjByName ($oIE, "pass") $oSubmit = _IEGetObjByName ($oIE, "Submit") _IEFormElementSetValue ($oUser, "user") _IEFormElementSetValue ($oPass, "pass") _IEAction ($oSubmit, "click") _IELoadWait($oIE)Definitely install DebugBar - Helps a lot with this stuff. Edited February 24, 2009 by exodius
pallavi Posted February 25, 2009 Author Posted February 25, 2009 (edited) Hello, Is the autoit supports the Internet explorer 7 ? i runed above mentioned code as ; but it was not exisuted in IE 7; but i can run the same in IE6, #include <IE.au3> $oIE = _IECreate ("http://www.smsc11.com/corp/corporate/entry.jsp"); $oUser = _IEGetObjByName ($oIE, "userid") $oPass = _IEGetObjByName ($oIE, "pass") $oSubmit = _IEGetObjByName ($oIE, "Submit") _IEFormElementSetValue ($oUser, "user") _IEFormElementSetValue ($oPass, "pass") _IEAction ($oSubmit, "click") _IELoadWait($oIE) Edited February 25, 2009 by pallavi
exodius Posted February 25, 2009 Posted February 25, 2009 Yup, I run IE7 on this computer and have several scripts at work all working with IE7. At what point is it failing?
pallavi Posted February 25, 2009 Author Posted February 25, 2009 hii Now i added #RequireAdmin at the begining of the application.. [ Vista OS & IE 7 ] now application will run smothly thanks for replaying
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