Jump to content

Recommended Posts

Posted (edited)

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
        EndSwitch
        Switch $sTagName
            Case 'dd'
                If $sResult = $sTagValue Then Return
            Case Else
                If $sResult = $sTagValue Then Return $oIEItem.innerText
        EndSwitch
    Next
    Return
EndFunc

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,

Félix

Edited by Duff360
Posted

I don't know how to do that! :)

I'm not good enough with AutoIT.

If someone has the solution it would be great otherwise it's fine.

Thanks!!

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
×
×
  • Create New...