Sign in to follow this  
Followers 0

How to click link automatically on IE page

7 posts in this topic

#1 ·  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



#3 ·  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))


System task ---> My first GUICalculator v1.0 ---> My version of the calculatorNetZilla 1.0 --> Web browserEmail Sender --> You can Send emails with this without opening a web browser

Share this post


Link to post
Share on other sites

#4 ·  Posted

Read the helpfile. _IELinkClickByText()

and also read the related Functions :P

Enjoy the complexity.Feel the power of simplicity.

Share this post


Link to post
Share on other sites

#5 ·  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

#6 ·  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

#7 ·  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


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

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