Taudy Posted June 5, 2011 Share 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 Link to comment Share on other sites More sharing options...
E1M1 Posted June 5, 2011 Share Posted June 5, 2011 try name instead src. (3rd param) edited Link to comment Share on other sites More sharing options...
Taudy Posted June 5, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
E1M1 Posted June 5, 2011 Share Posted June 5, 2011 do you have src="submit.jpg" in your html code? edited Link to comment Share on other sites More sharing options...
sleepydvdr Posted June 5, 2011 Share 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> Link to comment Share on other sites More sharing options...
Taudy Posted June 5, 2011 Author Share Posted June 5, 2011 yeah it's in the source Link to comment Share on other sites More sharing options...
Taudy Posted June 5, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now