Sign in to follow this  
Followers 0
IfThen

Get Object Value

3 posts in this topic

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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

Thanks for the answer. Solved. :)

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0