dar100111 Posted December 10, 2013 Posted December 10, 2013 Hey All! I think there might be a way to click on the right one by index for my $submit button. Has anyone ever tried this or know how I might be able to pull this off? It's clicking on the first one it comes too and I need the 3rd. Script below and thank you in advance! #include <IE.au3> #include <Excel.au3> #include <Array.au3> $counter = 1 $oIEb = _IECreate("http://www.ssui.com/inquiry_v2.html", 0, 1) $oFrame = _IEFrameGetObjByName($oIEb, "body") $Letter = _IEGetObjByName($oFrame, "LETTER") $minquiryfield = _IEGetObjByName($oFrame, "multiple_list") $submitbutton = _IEGetObjByName($oFrame, "CFBQCOMMAND") _IEFormElementSetValue($Letter, "s") _IEFormElementSetValue($minquiryfield, "E052809926") _IEAction($submitbutton, "click") _IELoadWait($oIEb) _IEAction($oIEb, "back")
Wruck Posted December 10, 2013 Posted December 10, 2013 (edited) The key to solving this one is in the source of the webpage. You want to submit the correct value to identify the button. <!--Button 1:--><INPUT type="submit" value="Submit/Single" name="CFBQCOMMAND"> <!--Button 2:--><INPUT type="submit" value="Submit/Multiple" name="CFBQCOMMAND"> <!--Button 3:--><INPUT type="submit" value="Submit/MultiList" name="CFBQCOMMAND"> Perhaps add another _IEFormElementSetValue() into your code? Something like this? #include <IE.au3> #include <Excel.au3> #include <Array.au3> $counter = 1 $oIEb = _IECreate("http://www.ssui.com/inquiry_v2.html", 0, 1) $oFrame = _IEFrameGetObjByName($oIEb, "body") $Letter = _IEGetObjByName($oFrame, "LETTER") $minquiryfield = _IEGetObjByName($oFrame, "multiple_list") $submitbutton = _IEGetObjByName($oFrame, "CFBQCOMMAND") _IEFormElementSetValue($Letter, "s") _IEFormElementSetValue($minquiryfield, "E052809926") _IEFormElementSetValue($submitbutton, "Submit/MultiList") _IEAction($submitbutton, "click") _IELoadWait($oIEb) _IEAction($oIEb, "back") Edited December 10, 2013 by Wruck
Solution dar100111 Posted December 10, 2013 Author Solution Posted December 10, 2013 Hey Wruck! Thanks man that worked great. A bit new to HTML and coding but that does make a lot of sense. Appreciate the help sir!
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