Sign in to follow this  
Followers 0
ashley

reading text in IE

3 posts in this topic

ok well i know how to read how many player but not a whole table...

here my code the amount of players.

#include <INet.au3>

Global $sStart = 'alt="RuneScape"><br>\n', $sEnd = '\n<iframe style="'

$sHTML = _INetGetSource('http://www.runescape.com/title.ws')
$aArray = StringRegExp($sHTML,'(?s)' & $sStart & '(.*?)' & $sEnd, 3)
MsgBox(0,"Runescape",$aArray[0])

right if you go to www.runescape.com it says the playes online there...

if you click play runescape and then on high/low detail there is a table... how would i read that...

and is it possible to put this in a listvies table too.

Share this post


Link to post
Share on other sites



If you have the page with the servers table open, this will get the info you're looking for.

#include <IE.au3>
#include <Array.au3>

$sURL = "http://www.runescape.com/"

_IEErrorHandlerRegister()
$oIE = _IEAttach($sURL, "URL")
$oFrame = _IEFrameGetCollection($oIE, 0)
$oTables = _IETableGetCollection($oFrame)
For $oTable In $oTables
    If String($oTable.className) = "server"  Then
        $oServerTable = $oTable
        ExitLoop
    EndIf
Next
$aArray = _IETableWriteToArray($oServerTable, 1)
_ArrayDisplay($aArray)

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  
Followers 0