Jump to content

Get Inner Text From Active IE Tab

Recommended Posts

Hello everyone,

I use _GetInnerText to get information from an Internet Web page with the following script:

Local $oIE = _IEAttach("Titre")
Local $aValues[1][3]
$aValues[0][0] = _GetInnerText('div', 'title')
$aValues[0][1] = _GetInnerText('div', 'source')
$aValues[0][2] = _GetInnerText('div', 'link')
Func _GetInnerText($sTagName, $sTagValue, $sTagType = 'className')
    Local $sResult, $oIETags
    $oIETags = $oIE.document.GetElementsByTagName($sTagName)
    For $oIEItem in $oIETags
        Switch $sTagType
            Case 'className'
                $sResult = $oIEItem.className
            Case 'id'
                $sResult = $oIEItem.id
        Switch $sTagName
            Case 'dd'
                If $sResult = $sTagValue Then Return
            Case Else
                If $sResult = $sTagValue Then Return $oIEItem.innerText

It works fine, but it gets information from the first tab.

Is there any way I can get the information from the active tab. All the tabs have unfortunately the same name.

Thank you very much,


Edited by Duff360
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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...