Jump to content

aggarwal

Active Members
  • Posts

    23
  • Joined

  • Last visited

aggarwal's Achievements

Seeker

Seeker (1/7)

0

Reputation

  1. Hello All I am kind of getting confused about something!! There is a website http://factfinder2.census.gov/faces/nav/jsf/pages/index.xhtml. Going on there we enter manufacturing in topic or table name and United States for state. Then select industries and proceed with the form. I have been able to make autoit to do that, the real problem arises on the next page. In this I want to have the click on the id which starts with "NS" and then increases like 08, 09. So it will be like NS09A1 or NS08A1. Of these two I would like NS09A1 to be clicked on as this corresponds to the most recent year 2009. So whenever there will be an update to the website there will be a new term NS10A1. So I would like an autoit code to compare and click and take me to the next page. I did read the table and transported it as an array but couldn't figure out how to compare and then pass the click to the correct variable. Thanks Aggarwal
  2. Thanks a lot for the help. I was able to use more formatting option and retrieve the table data with _IETableGetCollection, _IETableWriteToArray and writting them to an excel file. Thanks A lot Abhishek
  3. Hi Dale Thanks A lot for the clarrification and I will keep things in mind from now on. But As you said I tried using _IEFormImageClick but to no success. I always ended up getting No Match message. And I want to download the data in my computer every quaterly basis so that I can use it for the next step and I want no human interaction involved in it. So I still think the best option would be to click on that line you pointed if we can. Abhishek Aggarwal
  4. still none of them remins answered??
  5. Here is my code so far - #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) sleep(5000) I have tried clicking on the picture with image click and all but every time it shows no match!!
  6. also the rest are different as they have a direct download link attached to them! but here what happens after clicking download(thats what my guess is) that it reads the data from some other source and give it out after reading as a form!! So dont know how to go about it
  7. both are the same question but with no answer given? Any help?
  8. anyone with an idea to do this??
  9. Anyone got anything on this?? I am still stuck on it!!
  10. 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
  11. ohh ma bad. I did not realize I did print screen for two screens. Here goes the code of the download part- FORM NAME="excel" action="/pdq/SurveyOutputServlet" METHOD="POST" target="_blank" > <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="ENU190005051013"/> <input type="hidden" name="series_id" value="ENU190015051013"/> <input type="hidden" name="series_id" value="ENU190035051013"/> <input type="hidden" name="series_id" value="ENU190055051013"/> <input type="hidden" name="series_id" value="ENU190075051013"/> <input type="hidden" name="series_id" value="ENU190095051013"/> <input type="hidden" name="series_id" value="ENU190115051013"/> <input type="hidden" name="series_id" value="ENU190135051013"/> <input type="hidden" name="series_id" value="ENU190155051013"/> <input type="hidden" name="series_id" value="ENU190175051013"/> <input type="hidden" name="series_id" value="ENU190195051013"/> <input type="hidden" name="series_id" value="ENU190215051013"/> <input type="hidden" name="series_id" value="ENU190235051013"/> <input type="hidden" name="series_id" value="ENU190255051013"/> <input type="hidden" name="series_id" value="ENU190275051013"/> <input type="hidden" name="series_id" value="ENU190295051013"/> <input type="hidden" name="series_id" value="ENU190315051013"/> <input type="hidden" name="series_id" value="ENU190335051013"/> <input type="hidden" name="series_id" value="ENU190355051013"/> <input type="hidden" name="series_id" value="ENU190375051013"/> <input type="hidden" name="series_id" value="ENU190395051013"/> <input type="hidden" name="series_id" value="ENU190415051013"/> <input type="hidden" name="series_id" value="ENU190435051013"/> <input type="hidden" name="series_id" value="ENU190455051013"/> <input type="hidden" name="series_id" value="ENU190475051013"/> <input type="hidden" name="series_id" value="ENU190495051013"/> <input type="hidden" name="series_id" value="ENU190515051013"/> <input type="hidden" name="series_id" value="ENU190535051013"/> <input type="hidden" name="series_id" value="ENU190555051013"/> <input type="hidden" name="series_id" value="ENU190575051013"/> <input type="hidden" name="series_id" value="ENU190595051013"/> <input type="hidden" name="series_id" value="ENU190615051013"/> <input type="hidden" name="series_id" value="ENU190635051013"/> <input type="hidden" name="series_id" value="ENU190655051013"/> <input type="hidden" name="series_id" value="ENU190675051013"/> <input type="hidden" name="series_id" value="ENU190695051013"/> <input type="hidden" name="series_id" value="ENU190715051013"/> <input type="hidden" name="series_id" value="ENU190735051013"/> <input type="hidden" name="series_id" value="ENU190755051013"/> <input type="hidden" name="series_id" value="ENU190775051013"/> <input type="hidden" name="series_id" value="ENU190795051013"/> <input type="hidden" name="series_id" value="ENU190815051013"/> <input type="hidden" name="series_id" value="ENU190835051013"/> <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"/> <input type="hidden" name="series_id" value="ENU191015051013"/> <input type="hidden" name="series_id" value="ENU191035051013"/> <input type="hidden" name="series_id" value="ENU191055051013"/> <input type="hidden" name="series_id" value="ENU191075051013"/> <input type="hidden" name="series_id" value="ENU191095051013"/> <input type="hidden" name="series_id" value="ENU191115051013"/> <input type="hidden" name="series_id" value="ENU191135051013"/> <input type="hidden" name="series_id" value="ENU191155051013"/> <input type="hidden" name="series_id" value="ENU191175051013"/> <input type="hidden" name="series_id" value="ENU191195051013"/> <input type="hidden" name="series_id" value="ENU191215051013"/> <input type="hidden" name="series_id" value="ENU191235051013"/> <input type="hidden" name="series_id" value="ENU191255051013"/> <input type="hidden" name="series_id" value="ENU191275051013"/> <input type="hidden" name="series_id" value="ENU191295051013"/> <input type="hidden" name="series_id" value="ENU191315051013"/> <input type="hidden" name="series_id" value="ENU191335051013"/> <input type="hidden" name="series_id" value="ENU191355051013"/> <input type="hidden" name="series_id" value="ENU191375051013"/> <input type="hidden" name="series_id" value="ENU191395051013"/> <input type="hidden" name="series_id" value="ENU191415051013"/> <input type="hidden" name="series_id" value="ENU191435051013"/> <input type="hidden" name="series_id" value="ENU191455051013"/> <input type="hidden" name="series_id" value="ENU191475051013"/> <input type="hidden" name="series_id" value="ENU191495051013"/> <input type="hidden" name="series_id" value="ENU191515051013"/> <input type="hidden" name="series_id" value="ENU191535051013"/> <input type="hidden" name="series_id" value="ENU191555051013"/> <input type="hidden" name="series_id" value="ENU191575051013"/> <input type="hidden" name="series_id" value="ENU191595051013"/> <input type="hidden" name="series_id" value="ENU191615051013"/> <input type="hidden" name="series_id" value="ENU191635051013"/> <input type="hidden" name="series_id" value="ENU191655051013"/> <input type="hidden" name="series_id" value="ENU191675051013"/> <input type="hidden" name="series_id" value="ENU191695051013"/> <input type="hidden" name="series_id" value="ENU191715051013"/> <input type="hidden" name="series_id" value="ENU191735051013"/> <input type="hidden" name="series_id" value="ENU191755051013"/> <input type="hidden" name="series_id" value="ENU191775051013"/> <input type="hidden" name="series_id" value="ENU191795051013"/> <input type="hidden" name="series_id" value="ENU191815051013"/> <input type="hidden" name="series_id" value="ENU191835051013"/> <input type="hidden" name="series_id" value="ENU191855051013"/> <input type="hidden" name="series_id" value="ENU191875051013"/> <input type="hidden" name="series_id" value="ENU191895051013"/> <input type="hidden" name="series_id" value="ENU191915051013"/> <input type="hidden" name="series_id" value="ENU191935051013"/> <input type="hidden" name="series_id" value="ENU191955051013"/> <input type="hidden" name="series_id" value="ENU191975051013"/> </FORM>
  12. Hello Everyone!! So I am trying to automate this website(bea.gov). I am able to sail through all the forms and land on the final page of the website. Now I want to download the table that is at that page. They have given a download option but what I think(I am not the best person for website) is there is a image which is in a form of form and takes the data from the table below. Anyways the code for the download part of the fragment is attached below. Any help on it will be greatly appreciated!! Thanks Abhishek Aggarwal
  13. the HTML component of the download button is <a href="download.cfm?ext=xls&amp;fid=85CD5C5FD05DB9069819359089BB749068B1F7A69874E07C4C125F47FDEFAE13CC926FC9BE251D557ED3F5A8E8FE8D05F0E448B9ABAE4708056611E496046D81" onclick="clearPageLocks()" target="_blank">Download XLS File</a>
  14. It stiull doesnt work as soon as i click download XLS file a new window pop ups for a sec and vanishes and thye autoit script keeps running!!
×
×
  • Create New...