Jump to content
Sign in to follow this  

Open site, click on button and close

Recommended Posts

The site has 20 same button in java and i want to click the 3rd one

When i put my mouse on that button in statusbar it shows javascript:void(0), appears a message with name (or altname) asd, and in link to picture the name is name.gif

I wrote something like this (for clicking 1st button)

$oIE = _IECreate ("http://nameofsite")
sleep(5000) ; delay, because site have to load : D

; and i tried all those functions

_IEImgClick ($oIE, "name.gif", "src")
_IEImgClick ($oIE, "name.gif", "alt")
_IEImgClick ($oIE, "asd", "alt")
_IEImgClick ($oIE, "name.gif", "name")
_IEImgClick ($oIE, "asd", "name")
_IEImgClick ($oIE, "http://nameofsite/name.gif")

and those

_IEFormImageClick ($oIE, "name.gif", "alt")
_IEFormImageClick ($oIE, "asd", "alt")
_IEFormImageClick ($oIE, "name.gif", "src")
_IEFormImageClick ($oIE, "name.gif", "name")
_IEFormImageClick ($oIE, "asd", "name")
_IEFormImageClick ($oIE, "http://nameofsite/name.gif")

sleep(4000) ; pressing button

_IEQuit ($oIE)

But its not working, it just loads a site and then do nothing

Can someone fix it? or point me what im doing wrong?

And if there are few same buttons it is possible to click the 3rd one?

Edited by hmes

Share this post

Link to post
Share on other sites

You can get an img tag by zero-based index with _IEImgGetCollection() see help file.

Your attempts with _IEImgClick() may have failed because the elements were buried inside a frame/frame set/etc.

Examine the site with a DOM inspector to see what the full DOM path to one of the links is.


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...