Jump to content

Recommended Posts

Posted

other wise any app build to collect some data pages will be too hard to use it and slow 

just get search for specific value and then show it i arry that all  

Posted

You can just read the webpage into memory, storing the text of the page in a variable. Then scrape the page however you want

Local $sWebpage = BinaryToString(InetRead("https://www.autoitscript.com/"))
Local $aRegExp = StringRegExp($sWebpage, '<h2><a href="https\://www\.autoitscript\.com/site/autoit-news/autoit-v.*-released/">AutoIt v(.*) Released</a></h2>', 3)

If (@error) Then
    ConsoleWrite("Could not detect autoit release versions" & @CRLF)
Else
    ConsoleWrite("Latest AutoIt Version: " & $aRegExp[0] & @CRLF)
    For $i = 1 To UBound($aRegExp) - 1
        ConsoleWrite(@TAB & "Previous Version: " & $aRegExp[$i] & @CRLF)
    Next
EndIf

 

Posted

thanks a lot one more thing 

Can i pick witch line i need form html web to read to minimize the size and cut time to minim use to be faster 

like split the the code or just target specific area in code or line 

thank again 

Posted

thanks 

the code was good but the all code you got will saved in memory (RAM)

how can make sure the number of file will save will deleted after take specific code to make app very fast and not getting slow after while

thanks again 

Posted

Well there's no file in my example. And using more memory is not going to affect the speed of your process (if it does it's not worth mentioning)

You can set the variable to Null/0 when you're done with it to clear it

If you want to save the downloaded webpage to a file then just use FileWrite.

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...