Jump to content
Sign in to follow this  

Img Click on website?

Recommended Posts



i cant click on a image of a website.

Image i want to click:

<img id="n2" src="img/i/bb/x.gif" title="Xyz title">

how can i click this img with e.g. _IEImgClick ?

I think the problem is that a other img on this page has the same img path but an other id:

<img id="n1" src="img/i/bb/x.gif" title="Other title">

so the better question is... how can i click on the img per id?

Thx for help

Share this post

Link to post
Share on other sites

@KillingEye...As you have indicated the title of the links are different....So...

#include <IE.au3>
$oIE = _IECreate("http://www.autoitscript.com")

$sMyString = "wallpaper";Your link text
$oLinks = _IELinkGetCollection($oIE)
For $oLink in $oLinks
    $sLinkText = _IEPropertyGet($oLink, "innerText")
    If StringInStr($sLinkText, $sMyString) Then
        _IEAction($oLink, "click")

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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.