ghareeb Posted June 9, 2005 Share Posted June 9, 2005 Hi All i used this code to access and automate my object: With $ObjIE.document.forms(1) .elements(0).value = "*****" .elements(1).value = "*****" .submit.click()my question is : if i have more than one submit Button how can i access one of them or how can i choose specific button to click?Thank you! Are you read anything about islamok.... to know about realy Islamhttp://www.islam-guide.com click here====>Islam: Misunderstood throughout the World Link to comment Share on other sites More sharing options...
Valuater Posted June 9, 2005 Share Posted June 9, 2005 use "autoit window information" same location as autoit.exe then use ********** ControlCommand ( "title", "text", controlID, "command", "option" ) or ******** ControlClick ( "title", "text", controlID [, button] [, clicks]] ) hope it helps Link to comment Share on other sites More sharing options...
scriptkitty Posted June 10, 2005 Share Posted June 10, 2005 (edited) A few ways, control command and control click don't work in IE though. Look at the HTML of that page, usually there is a more specific name. With $ObjIE.document.forms(1) .elements(0).value = "*****" .elements(1).value = "*****" .submitbt.click(); this would be if button had a name of submitbt also you might find that the button doesn't actually have a name (sloppy html.) in that case you can search elements, or HREFs. With $ObjIE.document.forms(1) .elements(0).value = "*****" .elements(1).value = "*****" endwith $x= $ObjIE.document.forms(1).elements().length for $i = 0 to $x if stringinstr($ObjIE.document.forms(1).elements($i).outerHTML,"click to continue" )>0 then exitloop next $ObjIE.document.forms(1).elements($i).click() From memory, so might have a .document missing in there or something. You can also use this technique for HTML links, it works exceptionally good for javascript and frame links. (due to the fact that they change multiple frames and can't just be pasted in, or do page checks and such.) I will be posting some more UDFs for IE and the obj soon. (appearing in scraps soon) Edited June 10, 2005 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
scriptkitty Posted June 10, 2005 Share Posted June 10, 2005 added a lot of info and examples that work in http://www.autoitscript.com/forum/index.php?showtopic=12030 AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
ghareeb Posted June 11, 2005 Author Share Posted June 11, 2005 thank you ((scriptkitty)) Are you read anything about islamok.... to know about realy Islamhttp://www.islam-guide.com click here====>Islam: Misunderstood throughout the World 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