Jump to content
Sign in to follow this  

Get Object Value

Recommended Posts


Hi Im using that code to try to get value from google's button but it says that it has and error...

$oIE = _IECReate("http://www.google.es")
$oForms = _IEGetObjByName ($oIE, "meta")
For $oForm in $oForms
    StringInStr($oForm.value, "página")
    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

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.