Jump to content

Clicking a certain "button" on a webpage


Recommended Posts

What I'm trying to do is for my program to press a certain button on an internet site. For example on the Autoit Forums, theres buttons at the top like Blogs, Downloads, Calender, etc. How would I go about "reading" a site for certain characteristics of buttons and then choosing the right one to click based on those characteristics because right now I'm using mouseclicks and mousedrags like a noob and if something is different on the webpage and the coordinates are wrong then the whole thing would fail, thats why I'm trying to do this. I did search for awhile but whenever I found something it was more complicated then what I wanted. I just want to know the functions too, I'm not asking for a code or anything.

Link to comment
Share on other sites

  • Moderators

Have a look at the IE.au3 functions in the help file.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

  • Moderators

Ahh thank you for showing me where I need to look, in the IE Management section in the help file right?

You got it! :whistle:

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Well I came across something I dont really understand unfortunately

#include <IE.au3>
$oIE = _IE_Example ("basic")
_IEClickLinkByText ($oIE, "user forum")

I know the _IE_Example ("basic") is just an example but I dont know what I should change it to for the website I'm trying to use my program for. Also, the "user forum" part would be the text inside the button, like "FAST REPLY" on the autoit forum page right? After solving this I'll look around the help file some more to figure some more things out but the help file didnt help me much on this problem.

Link to comment
Share on other sites

Ah, bite me... I've got a typo in that example and I'm learning it must be one of the most enticing IE examples in the helpfile. Replace _IEClickLinkByText with _IELinkClickByText -- correction will be in the next release :whistle:

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

Link to comment
Share on other sites

  • 2 weeks later...

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