Jump to content

Recommended Posts

Posted

Hi,

I want to know if its possible to get first web site link of google search results like when you click on "I'm Feeling Lucky" without navigate...

Thanks for anyhelp or idea :)

Cheers, FireFox.

Posted

Something like this maybe?:)

#include <ie.au3>
$searchterm=StringReplace("AutoIt Wikipedia"," ","+")
$ie=_IECreate("http://www.google.com/search?hl=en&q="&$searchterm&"&btnG=Google+Search&aq=f&oq=",0,0)

$links=_IELinkGetCollection($ie)

$i=0
For $link In $links
    If $i=23 Then 
        MsgBox(0,$link.innerText,$link.href)
        ExitLoop
    EndIf
    
    $i+=1
Next

_IEQuit($ie)

Broken link? PM me and I'll send you the file!

Posted

@monoceres

Thanks for your suggestion, but I want to do it without navigate, like a direct link :)

Cheers, FireFox.

Posted

Got it!

#include <ie.au3>
$searchterm = StringReplace("AutoIt Wikipedia", " ", "+")
$url = "http://www.google.com/search?hl=en&q=" & $searchterm & "&btnI=I%27m+Feeling+Lucky&aq=f&oq="

$answer = MsgBox(68, "?", "Direct link to AutoIt Wikipedia is:" & @CRLF & $url & @CRLF & "Navigate now?")
If $answer = 6 Then ShellExecute($url)

Broken link? PM me and I'll send you the file!

  • 8 years later...
Posted
On 2/12/2009 at 9:47 PM, monoceres said:

Got it!

 

#include <ie.au3>
$searchterm = StringReplace("AutoIt Wikipedia", " ", "+")
$url = "http://www.google.com/search?hl=en&q=" & $searchterm & "&btnI=I%27m+Feeling+Lucky&aq=f&oq="

$answer = MsgBox(68, "?", "Direct link to AutoIt Wikipedia is:" & @CRLF & $url & @CRLF & "Navigate now?")
If $answer = 6 Then ShellExecute($url)

amazing tip :)

how can I do the same for image search please ??

  • Moderators
Posted (edited)

@AlienStar did you happen to notice this thread is over 9 years old? Please don't resurrect old posts, especially when what you're asking has absolutely NOTHING to do with the original question.

Start a new thread instead, include a detailed description of what you're trying to accomplish, along with what you have tried on your own, and we will do our best to assist.

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Posted
Just now, JLogan3o13 said:

@AlienStar did you happen to notice this thread is over 9 years old? Please don't resurrect old posts, especially when asking a completely different question. Start a new thread instead, include a detailed description of what you're trying to accomplish, along with what you have tried on your own, and we will do our best to assist.

oh sorry I didn't notice its date

I'll make a new thread :)

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