Sign in to follow this  
Followers 0
Taudy

_Ieimgclick

7 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



try name instead src. (3rd param)


edited

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

do you have src="submit.jpg" in your html code?


edited

Share this post


Link to post
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>

Share this post


Link to post
Share on other sites

yeah it's in the source

Share this post


Link to post
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

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  
Followers 0