hmes Posted September 23, 2010 Share Posted September 23, 2010 (edited) The site has 20 same button in java and i want to click the 3rd one When i put my mouse on that button in statusbar it shows javascript:void(0), appears a message with name (or altname) asd, and in link to picture the name is name.gif I wrote something like this (for clicking 1st button) $oIE = _IECreate ("http://nameofsite") sleep(5000) ; delay, because site have to load : D ; and i tried all those functions _IEImgClick ($oIE, "name.gif", "src") _IEImgClick ($oIE, "name.gif", "alt") _IEImgClick ($oIE, "asd", "alt") _IEImgClick ($oIE, "name.gif", "name") _IEImgClick ($oIE, "asd", "name") _IEImgClick ($oIE, "http://nameofsite/name.gif") and those _IEFormImageClick ($oIE, "name.gif", "alt") _IEFormImageClick ($oIE, "asd", "alt") _IEFormImageClick ($oIE, "name.gif", "src") _IEFormImageClick ($oIE, "name.gif", "name") _IEFormImageClick ($oIE, "asd", "name") _IEFormImageClick ($oIE, "http://nameofsite/name.gif") sleep(4000) ; pressing button _IEQuit ($oIE) But its not working, it just loads a site and then do nothing Can someone fix it? or point me what im doing wrong? And if there are few same buttons it is possible to click the 3rd one? Edited September 23, 2010 by hmes Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 23, 2010 Share Posted September 23, 2010 You can get an img tag by zero-based index with _IEImgGetCollection() see help file. Your attempts with _IEImgClick() may have failed because the elements were buried inside a frame/frame set/etc. Examine the site with a DOM inspector to see what the full DOM path to one of the links is. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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