Jump to content

_Ieimgclick


Recommended Posts

Hi, so i have coded a program to automatically open a window and navigate to my webpage, the webpage loads and has an ackknowledgement button named submit.jpg to show you went to the webpage, and i want to automatically click it, however it is generated dynamically so i can't pixel click it.

i tried this code.

#include <ie.au3>
$IEObject =  Run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE")
winwaitactive("Blank Page - Windows Internet Explorer")

WinSetState ("Blank Page - Windows Internet Explorer", "", @SW_MaxIMIZE)

send ("myurl.com" )
Send ("{ENTER}")

sleep (2000)
send ("password")
send ("{enter}")

sleep (4000)
send ("{enter}" )
send ("{ENTER}")
sleep (2000)




_IEImgClick ($IEObject, "submit.jpg", "src")

it works upto where i want it to click submit, no error pops up, but it doesn't click the image, any suggestions? thanks

Edited by Taudy
Link to comment
Share on other sites

I just tried that, with the same effect, would it make a difference if i had 2 of the same image on the screen, but each led to a different location, i assumed it would find the first one on the screen, if this makes a difference is there a way to make it select the first one it comes across?

thanks

Link to comment
Share on other sites

I just tried that, with the same effect, would it make a difference if i had 2 of the same image on the screen, but each led to a different location, i assumed it would find the first one on the screen, if this makes a difference is there a way to make it select the first one it comes across?

thanks

It might make a difference having 2 images named the same. There is a fourth parameter that lets you choose from multiple instances. Try this:

_IEImgClick ($IEObject, "submit.jpg", "src", 1)

#include <ByteMe.au3>

Link to comment
Share on other sites

It might make a difference having 2 images named the same. There is a fourth parameter that lets you choose from multiple instances. Try this:

_IEImgClick ($IEObject, "submit.jpg", "src", 1)

didn't work, :huh2: just sits there and acts like nothing happened lol

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...