Jump to content

How to get detailed information in a webpage with IE.au3


 Share

Go to solution Solved by Danp2,

Recommended Posts

Hey guys!

Iam trying to get an information in a website with usefull UDF IE.au3. I need a little help.

<li>
  <a href="myacc">
    <div class="notification">1</div>
    <img src="http://cdn.example.com/img/my_acc.png" alt="My Account">
    <span>my accs</span>
  </a>
</li>

<li>
  <a href="mysets">
    <div class="notification">3</div>
    <img src="http://cdn.example.com/img/my_sets.png" alt="My Sets">
    <span>my sets</span>
  </a>
</li>

So there is 2 information Iam trying to get:
1. There is 1 notification in "myacc"

2. There is 3 notification in "mysets"

If I figure out how should I get notification in "myaccs" then I can get the other one same way :)  I dont know how to get it because I dont know what kind a property is this ">1<" or is it even a property.

Iam trying to reach those separetly. Here is what did I do so far:

 

$oIE = _IECreate("http://example.com/")

Login()
Check()

Func Check()
    Local $oA, $oAs = _IETagNameGetCollection($oIE, 'a')
    For $oA In $oAs
        If String($oA.href) = "myacc" Then
            Local $oDiv, $oDivs = _IETagNameGetCollection($oA, 'div')
            For $oDiv In $oDivs
                If String($oDiv.classname) = "notification" Then
                    ;There is need be some code to get how many notifications. I mean ">1<" part.
                Else
                    MsgBox(1,"failed","exit")
                    ExitLoop
                EndIf
            Next
        Else
            ;MsgBox(1,"fail2","try2")
        EndIf
    Next
    MsgBox(1,"didnt find anything","??")
EndFunc

Iam new about objects so my way could be way too lame.

Any improvement and suggestions are much appreciated. Thanks!

Edited by cburak
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...