Jump to content

Check first few Google Results.


Recommended Posts

Get the source, put it into array & search it for links/text, find link u need, & use INetGetSource again to get the source of that link. etc. etc.

#include <inet.au3> HTMLSource = _INetGetSource('http://www.google.ee/search?q=autoit')

    $_Arrayline = StringSplit($HTMLSource, @LF) 
;~  
        for $i = 1 to $_Arrayline[0] 
            If StringInStr($_Arrayline[$i],'</title>') Then  do something

            
        Next
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Thanks, but it doesn't appear to work very well.

#include <inet.au3>

$HTMLSource = _INetGetSource('http://www.google.com.au/search?q=autoit')
$_Arrayline = StringSplit($HTMLSource, @LF)

For $i = 1 To $_Arrayline[0]
    If StringInStr($_Arrayline[$i], "AutoIt Script") Then
        MsgBox(0, "", "!")
    EndIf
Next

Tried that, and it doesn't show a Message Box. And "AutoIt Script" is part of the second result for me.

Link to comment
Share on other sites

Thanks, but it doesn't appear to work very well.

...

Tried that, and it doesn't show a Message Box. And "AutoIt Script" is part of the second result for me.

replace it with consolewrite:

If StringInStr($_Arrayline[$i], "AutoIt") Then
        ;MsgBox(0, "", "!")
        ConsoleWrite($_Arrayline[$i] & @CRLF)
    EndIf
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Nothing appears in console.

search for autoit not autoit script

If StringInStr($_Arrayline[$i], "AutoIt") Then
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
Share on other sites

Hi,

try this:

#include <ie.au3>

$oIe = _IECreate ('http://www.google.com.au/search?q=autoit', 0, 0)
$HTMLSource = _IEBodyReadText ($oIe)
_IEQuit ($oIe)
$_Arrayline = StringSplit($HTMLSource, @LF)

For $i = 1 To $_Arrayline[0]
    If StringInStr($_Arrayline[$i], "AutoIt Script") Then
        ConsoleWrite($_Arrayline[$i] & @CRLF)
    EndIf
Next

;-))

Stefan

Link to comment
Share on other sites

I'm searching for "AutoIt Script", and it's one of the results, your script doesn't work.

if you take your time & look the the source you will notice that sometimes you need to search for <em>AutoIt</em> Script instead of AutoIt Script

of course you can simply do:

$HTMLSource = StringReplace($HTMLSource,'<em>','')
$HTMLSource = StringReplace($HTMLSource,'</em>','')

    $_Arrayline = StringSplit($HTMLSource, @LF) 
;~  
        for $i = 1 to $_Arrayline[0] 
            If StringInStr($_Arrayline[$i], "AutoIt script") Then

                    ConsoleWrite($_Arrayline[$i] & @CRLF)
                    
                    etc...
Edited by goldenix
My Projects:[list][*]Guide - ytube step by step tut for reading memory with autoitscript + samples[*]WinHide - tool to show hide windows, Skinned With GDI+[*]Virtualdub batch job list maker - Batch Process all files with same settings[*]Exp calc - Exp calculator for online games[*]Automated Microsoft SQL Server 2000 installer[*]Image sorter helper for IrfanView - 1 click opens img & move ur mouse to close opened img[/list]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...