IfThen Posted July 14, 2009 Share Posted July 14, 2009 Hi Im using that code to try to get value from google's button but it says that it has and error... #include<IE.au3> $oIE = _IECReate("http://www.google.es") $oForms = _IEGetObjByName ($oIE, "meta") For $oForm in $oForms StringInStr($oForm.value, "página") Next MsgBox(0,"", $oForm.value) P.D: As you can see, It's Google.es cause im from Spain.. and sorry cause my bad English. Link to comment Share on other sites More sharing options...
Authenticity Posted July 14, 2009 Share Posted July 14, 2009 Read the parameters descriptions in the help file for the IEGetObjByName() function. If the last parameter is 0 or greater then it'll return the indexed object in case it other objects has that same property name. If it's -1 it returns a collection. From your code it seems that this is the error. Additionally, you can use _IEErrorHandlerRegister() to output com error to the output instead of crashing your application. Link to comment Share on other sites More sharing options...
IfThen Posted July 14, 2009 Author Share Posted July 14, 2009 Thanks for the answer. Solved. 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