Function Reference


Googles your search query and returns an array of urls to sites that were the search results.

_Google ( "search query" [,NumberOfResults] )



search query The search query that you would normally enter into the google search box.
NumberOfResults [optional] Use this parameter to specify the desired number of search results. Google will not return more than 100.
  10 = (default) will return 10 search result urls


Return Value

Success: Returns an array, the first element ($array[0]) contains the number of urls returned, the remaining elements ($array[1], $array[2], etc.) contain the urls.
Failure: Returns 0 and sets @error.
@Error: 0 = No Error.
1 = Was unable to contact to initiate the search query to get the search results.
2 = The search results were in an incorrect format and couldn't be sorted into an array.
3 = The second parameter was not an integer and was therefore invalid.



Uses a function in the Inet.au3 include file.






#include <Array.au3>
#include <Inet.au3>
Local $a_Urls
$a_Urls =_Google("autoitscript", 10)
_ArrayDisplay( $a_Urls,"Search Result URLs:")