IanN1990 Posted February 20, 2016 Share Posted February 20, 2016 (edited) Hello All, Its been a while since i last posted but i could never say away from autoit for long I am having issue with a script. I am using the function _IEGetObjByID shown below in a basic example #include <IE.au3> Local $oIE = _IE_create("examplewebsite.com") Local $oSubmit= _IEGetObjById($oIE, "Go") _IEAction($oSubmit, "click") Now the script works perfectly. The problem is on the website i am using it has two "Go" buttons and this script only clicks the first. How would i work around this? Ian P.S The website in the code is an example, as the target website is run through a intranet. So i only have access to it Edited February 20, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
AutoBert Posted February 20, 2016 Share Posted February 20, 2016 That other's having no access is ok, but you can help other's to help you: Please paste Code of the website. _IEBodyReadHTML will help to get the needed Informations. Link to comment Share on other sites More sharing options...
Juvigy Posted February 20, 2016 Share Posted February 20, 2016 You will need to show us the site source code of the button. Link to comment Share on other sites More sharing options...
IanN1990 Posted February 20, 2016 Author Share Posted February 20, 2016 (edited) Unfortunately its a company website, so i cant not post anything like that i am afraid. Surely this problem must be quite common though? To have two "items" with the same name? In the help file it mentions an option for indexing using -1 instead of 0. Does this return a list of all the items found with the word Go? If so how would i access that index Edited February 20, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
IanN1990 Posted February 20, 2016 Author Share Posted February 20, 2016 (edited) Following your advice though, looking at the HTML i see they are both very similar but with a few differences. How could i search for a "item" by the value only Example. value="Go" or perhaps Input Onclick Edited February 20, 2016 by IanN1990 Link to comment Share on other sites More sharing options...
Juvigy Posted February 20, 2016 Share Posted February 20, 2016 Posting only a portion of the source code should not violate any company privacy. You will need to show us some source code for the second button. Alternatively i would advise you to check _IETagNameGetCollection 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