Jump to content
Sign in to follow this  

Need Help with IE dialog box

Recommended Posts



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)


$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

$oPgm.value = $sPgm
_IEAction($oSubmit, "click")


$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

_IEAction($oExportExcel, "click")

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.




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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.