Taudy 0 Posted June 5, 2011 (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 June 5, 2011 by Taudy Share this post Link to post Share on other sites
E1M1 8 Posted June 5, 2011 try name instead src. (3rd param) edited Share this post Link to post Share on other sites
Taudy 0 Posted June 5, 2011 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
E1M1 8 Posted June 5, 2011 do you have src="submit.jpg" in your html code? edited Share this post Link to post Share on other sites
sleepydvdr 8 Posted June 5, 2011 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?thanksIt 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
Taudy 0 Posted June 5, 2011 yeah it's in the source Share this post Link to post Share on other sites
Taudy 0 Posted June 5, 2011 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, just sits there and acts like nothing happened lol Share this post Link to post Share on other sites