Jump to content

IE finding the value


Wheezer
 Share

Recommended Posts

Hello guys!

I'm trying to let a value of a stock exchange appear in a message box.

After struggling for quite some time, i figured out how to find the id and class in a webpage.

But i got stuck.. how can i grab the value and make it appear in the msgbox? 

 

#include <IE.au3>

$oIE = _IEAttach("", "instance", 1)

$tags = $oIE.document.GetElementsByTagName("td")
For $tag in $tags
    $id_value = $tag.id
    If $id_value = "premium_exchange_stock_wood" Then
        MsgBox(0, "found ", $id_value)
    EndIf
Next

my code right now

I have added a picture to show what i'm trying to put out in the messagebox 

 

Wheezer

 

stock.png

Link to comment
Share on other sites

22 minutes ago, Jfish said:

I don't think it would be $id_value = $tag.id  (though I can't test without your site).  Try $id_value = $tag.innertext. 

Thank you for the quick reply, it runs but gives me no msgbox :(

#include <IE.au3>

$oIE = _IEAttach("", "instance", 1)


$tags = $oIE.document.GetElementsByTagName("td")
For $tag in $tags
    $id_value = $tag.innertext
    If $id_value = "premium_exchange_stock_wood" Then
        MsgBox(0, "found ", $tag.innertext)
    EndIf
Next

 

Link to comment
Share on other sites

2 hours ago, Jfish said:

What happened when you used the innertext property?  Can you post the URL so I can try?

It did not give me a messagebox or any output at all (strange) but you made me realise the values are in the innertext.

The stock is not free accessible but i made a screenshot to show how it looks

 

look.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...