http://www.televideo.rai.it/televideo/p ... pagina=786
I wish take this area
![Image](https://i.postimg.cc/SxTV0c05/televideo.png)
and converte it on array automatically
how could this be done?
Code: Select all | Expand
Function TestUrl(cUrl)
local cRet := WebPageContents( cUrl )
local cFile:="test.txt"
if Empty( cRet )
? "Invalid URL"
else
? cRet
endif
memoedit( cRet )
return nil
Code: Select all | Expand
Function TestUrl( cUrl )
local cRet := WebPageContents( cUrl )
local cFile := "test.txt"
LOCAL cBuff
LOCAL nHndl
LOCAL aShow
LOCAL nI
if Empty( cRet )
? "Invalid URL"
else
cRet := subStr( cRet, at( "BARI", cRet ) )
cRet := allTrim( subStr( cRet, 1, at( "Controlla", cRet ) - 1 ) )
nHndl := fCreate( cFile )
fWrite( nHndl, cRet )
fClose( nHndl )
IF ( nHndl := fOpen( cFile ) ) < 1
msgStop( "UNABLE TO OPEN: " + cFile )
ELSE
aShow := {}
WHILE hb_fReadLine( nHndl, @cBuff, chr( 10 ) ) == 0
cBuff := allTrim( cBuff )
IF ! empty( cBuff )
aAdd( aShow, {} )
aAdd( aTail( aShow ), subStr( cBuff, 1, 11 ) )
FOR nI := 12 TO 28 STEP 4
aAdd( aTail( aShow ), subStr( cBuff, nI, 2 ) )
NEXT
ENDIF
ENDDO
xBrowse( aShow )
ENDIF
endif
return nil
ADutheil wrote:Code: Select all | Expand
Function TestUrl( cUrl )
local cRet := WebPageContents( cUrl )
local cFile := "test.txt"
LOCAL cBuff
LOCAL nHndl
LOCAL aShow
LOCAL nI
if Empty( cRet )
? "Invalid URL"
else
cRet := subStr( cRet, at( "BARI", cRet ) )
cRet := allTrim( subStr( cRet, 1, at( "Controlla", cRet ) - 1 ) )
nHndl := fCreate( cFile )
fWrite( nHndl, cRet )
fClose( nHndl )
IF ( nHndl := fOpen( cFile ) ) < 1
msgStop( "UNABLE TO OPEN: " + cFile )
ELSE
aShow := {}
WHILE hb_fReadLine( nHndl, @cBuff, chr( 10 ) ) == 0
cBuff := allTrim( cBuff )
IF ! empty( cBuff )
aAdd( aShow, {} )
aAdd( aTail( aShow ), subStr( cBuff, 1, 11 ) )
FOR nI := 12 TO 28 STEP 4
aAdd( aTail( aShow ), subStr( cBuff, nI, 2 ) )
NEXT
ENDIF
ENDDO
xBrowse( aShow )
ENDIF
endif
return nil