Jump to content

Need Help Clicking Links


Recommended Posts

I made my first script which opens intenet explorer, types in a search query to Google and hits return which then gives me the search results. the next thing i want to do is click on (or select) the first search result link on the page (i don't want to click on any ads). Could someone please provide some help in doing this?

Link to comment
Share on other sites

Ok, got beta working now. Here's what I have so far:

#include <IE.au3>

$o_IE = _IECreate ()
_IENavigate ($o_IE, "http://www.google.com")
WinWaitActive("Google - Microsoft Internet Explorer")
Send('test')
Send("{ENTER}")
WinWaitActive('test - Google Search')
_IEClickLinkByIndex ($o_IE, 18)

I want to be able to click on all 10 search result links on the page. The problem with the IEClickLinkByIndex function is that, i never know what the index for links 1-10 will be. Because of advertisements and other stuff it can be different every time. Any suggestions?

Edited by pcarlow
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...