Hi,
I am a newbie and writing script to save an excel file to a particular location. Here is my code-
#include <IE.au3>
Local $oPgm, $oSubmit, $oExportExcel, $oDest
Local $sPgm = "SOME VALUE"
Local $url = "SOME VALUE"
Local $oDest = "D:\"
Local $oIE = _IECreate($url, 1)
_IELoadWait($oIE)
$oInputs = _IETagNameGetCollection($oIE, "input")
for $oInput in $oInputs
if $oInput.type = "text" And $oInput.name = "ctl00$ContentPlaceHolder1$ProgrammeTextBox" Then $oPgm = $oInput
if $oInput.type = "submit" And $oInput.value = "FIND" Then $oSubmit = $oInput
if isObj($oPgm) And isObj($oSubmit) then exitloop
Next
$oPgm.value = $sPgm
_IEAction($oSubmit, "click")
_IELoadWait($oIE)
$oInputs = _IETagNameGetCollection($oIE, "input")
for $oInput in $oInputs
if $oInput.type = "image" And $oInput.name = "ctl00$ContentPlaceHolder1$btnExport" Then $oExportExcel = $oInput
if isObj($oExportExcel) then exitloop
Next
_IEAction($oExportExcel, "click")
_IELoadWait($oIE)
WinActivate("File Download")
Sleep ("1000")
ControlClick("File Download", "", "[CLASS:Button; INSTANCE:2]")
I am stuck now. do not know what code to write next to save the file to a particular location. I am on IE 8 with win XP SP3.
Can someone please help! I searched in forums but could not conclude the easiest approach. Also, if someone can look at my code and suggest more efficient code, that would help as well.
regards