Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

How to click link automatically on IE page


  • Please log in to reply
6 replies to this topic

#1 darcaro

darcaro

    Seeker

  • Active Members
  • 20 posts

Posted 24 October 2008 - 01:49 PM

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, 24 October 2008 - 01:49 PM.








#2 dbzfanatic

dbzfanatic

    functional psychopath!!

  • Active Members
  • PipPipPipPipPipPip
  • 1,090 posts

Posted 24 October 2008 - 01:56 PM

Read the helpfile. _IELinkClickByText()

#3 farhan879

farhan879

    Wayfarer

  • Active Members
  • Pip
  • 81 posts

Posted 24 October 2008 - 02:00 PM

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

Posted ImageSystem 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

#4 Cw2K1

Cw2K1

    Wayfarer

  • Active Members
  • Pip
  • 79 posts

Posted 24 October 2008 - 02:02 PM

Read the helpfile. _IELinkClickByText()

and also read the related Functions :P
Enjoy the complexity.Feel the power of simplicity.

#5 dbzfanatic

dbzfanatic

    functional psychopath!!

  • Active Members
  • PipPipPipPipPipPip
  • 1,090 posts

Posted 24 October 2008 - 02:27 PM

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.

#6 darcaro

darcaro

    Seeker

  • Active Members
  • 20 posts

Posted 24 October 2008 - 05:02 PM

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!

#7 DaleHohm

DaleHohm

    Think of IE as an API...

  • MVPs
  • 5,986 posts

Posted 24 October 2008 - 11:33 PM

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





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users