Sign in to follow this  
Followers 0

How to click link automatically on IE page

7 posts in this topic

Posted (edited)

Hello -

I have a very simple AutoIT gui that allows me to launch a webpage by concatenating variables and creating a url. The trouble is, I always get the "Continue to this website (not recommended) " message.

Is there any easy way to click certain links , and for that matter, click on any text on a given screen?? This would be incredibly helpful!

Thanks!!

Edited by darcaro

Share this post


Link to post
Share on other sites



Posted

Read the helpfile. _IELinkClickByText()

Share this post


Link to post
Share on other sites

Posted

#include <file.au3> 
$URL    = "www.google.com"
             $fd        = FileOpen(@TEMPDir & "url.url",2)
             if $fd = -1 Then Exit
             FileWriteLine($fd,"[InternetShortcut]")
             FileWriteLine($fd,"URL=" & $URL)
             FileClose($fd)
             Run(@comspec & " /c " & chr(34) & @TEMPDir & "url.url" & chr(34))

Share this post


Link to post
Share on other sites

Posted

Read the helpfile. _IELinkClickByText()

and also read the related Functions :P

Share this post


Link to post
Share on other sites

Posted

and also read the related Functions :P

You're stalking me aren't you? XD It's pretty common sense to read related functions for future reference but I suppose it never hurts to mention it.

Share this post


Link to post
Share on other sites

Posted

This is great - the one thing is that there are a few clicks on the page that I wanted to click on , and _IELinkClickByText worked for some of them, but not all. The ones that dont work seem to be Javascript items - Is there any way to search for that text, and click that?? When I hover over it, I can see the where it wants to go (which appears to be a URL) but it doesnt click using that function.

Thank you all so much for your help!

Share this post


Link to post
Share on other sites

Posted

Suggest you download DebugBar (see my sig) to easily see the structure of the HTML page. LINKs are <A> tags... you can click on other elements with _IETagnameGetCollection and _IEAction, but you need to study a bit.

Dale

Share this post


Link to post
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
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.