mike1305 Posted July 26, 2006 Posted July 26, 2006 (edited) I am new at this IE topic so stick with me. Here is my code, with the questionmarks being what i am stuck on. $oIE = _IECreate ("http://support.dell.com/support/downloads/index.aspx?c=us&l=en&s=gen&~f=") $oForm = _IEFormGetObjByName ($oIE, "frmProductSelect") $oQuery = _IEFormElementGetObjByName ($oForm, "ServiceTag") _IEFormElementSetValue ($oQuery, $ServiceTag) _IEFormSubmit ($oForm) Sleep("1000") $oIE2 = ?????????????????????????????????????????? $oForm2 = _IEFormGetObjByName ($oIE2, "formDownloadsCriteria") $oQuery2 - _IEFormElementGetObjByName ($oForm2, "os") If @OSVersion = WIN_XP then _IEFormElementSetValue ($oQuery2, "WW1") ElseIf @OSVersion = WIN_2000 then _IEFormElementSetValue ($oQuery2, "WNT5") EndIf _IEFormSubmit ($oForm2) It goes to the dell support download page and enters the computer's service tag into the field and goes to the next page. On the next page is a combo box with operating system selections; I figure I will do the exact same 5 steps as above, but I don't know what to set as the $oIE variable (as a reference for the _IEFormGetObjByName ). Is there something that sets the varaible to the current page, like @currentwindow or something? thanks! Edited July 26, 2006 by mike1305 Amp Energy Drink: the official sponsor of me scripting at 2AM.
mike1305 Posted July 26, 2006 Author Posted July 26, 2006 edited. please take a second look at the code! Amp Energy Drink: the official sponsor of me scripting at 2AM.
Moderators big_daddy Posted July 26, 2006 Moderators Posted July 26, 2006 I am new at this IE topic so stick with me. Here is my code, with the questionmarks being what i am stuck on. It goes to the dell support download page and enters the computer's service tag into the field and goes to the next page. On the next page is a combo box with operating system selections; I figure I will do the exact same 5 steps as above, but I don't know what to set as the $oIE variable (as a reference for the _IEFormGetObjByName ). Is there something that sets the varaible to the current page, like @currentwindow or something? thanks! Try this: #include <IE.au3> $ServiceTag = "your-service-tag" $sURL = "http://support.dell.com/support/downloads/index.aspx?c=us&l=en&s=gen&~f=" $oIE = _IECreate($sURL) $oForm1 = _IEFormGetObjByName($oIE, "frmProductSelect") $oQuery1 = _IEFormElementGetObjByName($oForm1, "ServiceTag") _IEFormElementSetValue($oQuery1, $ServiceTag) _IEFormSubmit($oForm1) $oForm2 = _IEFormGetObjByName($oIE, "formDownloadsCriteria") $oQuery2 = _IEFormElementGetObjByName($oForm2, "os") If @OSVersion = "WIN_XP" Then _IEFormElementSetValue($oQuery2, "WW1") ElseIf @OSVersion = "WIN_2000" Then _IEFormElementSetValue($oQuery2, "WNT5") EndIf _IEFormSubmit($oForm2)
mike1305 Posted July 26, 2006 Author Posted July 26, 2006 worked perfect. thanks a million! Amp Energy Drink: the official sponsor of me scripting at 2AM.
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