Jump to content
Sign in to follow this  
aggarwal

Save As Dialogue Box Not appearing

Recommended Posts

aggarwal

Hello Everyone

I am trying to download a website for www.bls.gov. I have the following code uptill now -

#include <IE.au3>
$oIE = _IECreate("http://data.bls.gov/cgi-bin/dsrv?en")
$oForm = _IEFormGetCollection($oIE, 2)
$oSelect = _IEFormElementGetObjByName($oForm, "industry_code")
_IEFormElementOptionSelect($oSelect, "1013 Manufacturing", 1, "byText")
_IEFormSubmit ($oForm)
$oForm = _IEFormGetCollection($oIE, 2)
$oSelect = _IEFormElementGetObjByName($oForm, "area_code")
_IEFormElementOptionSelect($oSelect, "19000 Iowa -- Statewide", 1, "byText")
$a=19001
_IEFormSubmit ($oForm)
$oForm = _IEFormGetCollection($oIE, 2)
$oSelect = _IEFormElementGetObjByName($oForm, "owner_code")
_IEFormElementOptionSelect($oSelect, "5 Private", 1, "byText")
_IEFormSubmit ($oForm)
$oForm = _IEFormGetCollection($oIE, 2)
$oSelect = _IEFormElementGetObjByName($oForm, "type_code")
_IEFormElementOptionSelect($oSelect, "5 Average Annual Pay", 1, "byText")
_IEFormSubmit ($oForm)
$oForm = _IEFormGetCollection($oIE, 2)
$oSelect = _IEFormElementGetObjByName($oForm, "size_code")
_IEFormElementOptionSelect($oSelect, "0 All establishment sizes", 1, "byText")
_IEFormSubmit ($oForm)
$oForm = _IEFormGetCollection($oIE, 2)
_IEFormSubmit ($oForm)
_IEFormImageClick($oIE, "More Formatting Options", "alt")
$oForm = _IEFormGetObjByName($oIE, "format")
$oSelect = _IEFormElementGetObjByName($oForm, "output_type")
_IEFormElementOptionSelect($oSelect, "Multi-series table", 1, "byText")
$oSelect = _IEFormElementGetObjByName($oForm, "delimiter")
_IEFormElementOptionSelect($oSelect, "tab delimited", 1, "byText")
_IEFormSubmit ($oForm)

Now from here I need to click the download option. I am not able to figure out how it needs to be done(Sorry not too much programming experience). Here is the script for the download option-

<div class="download" style="border:none;padding:4px;">
<form name="excel" action="/pdq/SurveyOutputServlet" method="POST" target="_blank"></form>
<b>Download:</b>
<input id="download_xls" type="image" src="/images/buttons/download_button_xls.gif" alt="Download as an Excel File" value="Download as an Excel File" style="vertical-align: middle">
<input type="hidden" name="request_action" value="get_data">
<input type="hidden" name="reformat" value="true">
<input type="hidden" name="from_results_page" value="true">
<input type="hidden" name="years_option" value="specific_years">
<input type="hidden" name="delimiter" value="comma">
<input type="hidden" name="output_type" value="multi">
<input type="hidden" name="periods_option" value="all_periods">
<input type="hidden" name="output_view" value="data|">
<input type="hidden" name="to_year" value="2010">
<input type="hidden" name="from_year" value="2001">
<input type="hidden" name="output_format" value="excel">
<input type="hidden" name="original_output_type" value="default">
<input type="hidden" name="series_id" value="ENU190855051013">
<input type="hidden" name="series_id" value="ENU190875051013">
<input type="hidden" name="series_id" value="ENU190895051013">
<input type="hidden" name="series_id" value="ENU190915051013">
<input type="hidden" name="series_id" value="ENU190935051013">
<input type="hidden" name="series_id" value="ENU190955051013">
<input type="hidden" name="series_id" value="ENU190975051013">
<input type="hidden" name="series_id" value="ENU190995051013">
</div>

Any help will really be appreciated.

Thanks

Abhishek Aggarwal

Share this post


Link to post
Share on other sites
aggarwal

Anyone got anything on this?? I am still stuck on it!!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×