Ned Posted May 28, 2011 Posted May 28, 2011 (edited) I can't get this form to submit for a script I am making I have tried using _IEFormSubmit() and _IEAction($Form, "Click") with no success. Below is the HTML & autoit snipplet. #include <IE.Au3> $Zip = 12345 $IE = _IECreate ("http://gasbuddy.com/GB_Mem_log_in.aspx", "", 1) $Form = _IEFormGetObjByName ($IE, "aspnetForm") $Inp_Zip = _IEFormElementGetObjByName ($Form, "ctl00$Content$txtCityname") $Btn_Submit = _IEFormElementGetObjByName ($Form, "ctl00$Content$btnLocate") _IEFormElementSetValue($Inp_Zip, $Zip) ;_IEFormSubmit($Form) _IEAction($Btn_Submit, "Click") <input name="ctl00$Content$txtCityname" type="text" value="33777" id="ctl00_Content_txtCityname" autocomplete="off" style="width:300px;font-size: 16px;" /> <input type="submit" name="ctl00$Content$btnLocate" value="Find My Site" id="ctl00_Content_btnLocate" style="font-size: 16px; font-family: arial;" /> EDIT/// And once again I solved my own problem with further tinkering. Ended up not giving it time to load the page to redirect after clicking the button. Solved with adding the below script. Do Global $Address = _IEPropertyGet($IE, "locationurl") Global $IE_Loc = String($Address) Global $IE_Loc_A = StringSplit($IE_Loc,"/") Global $HomeWebsite = String($IE_Loc_A[3]) Until $HomeWebsite <> "gasbuddy.com" Edited May 28, 2011 by Ned
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