Jump to content
Sign in to follow this  

Close Download Complete Daialog Issue

Recommended Posts


I have files that download from a web site and they work fine most of the time. Before I download a file now, I set the registry entry to enable the download complete dialog box so I can tell the download has completed. I started noticing the dialog not appearing sometimes and added the registry setting to force it before each download. The download is in a loop with a 120 second timeout so I can set the registry and retry the download. This works fine and I have a workaround.

I witnessed this today:

a) Downloading begins.

;) Download takes longer than normal.

c) The check box to close the dialog when download completes is checked (without intervention or coding on my part) and

the dialog closes.

d) No download complete dialog appears.

Since I have this coded in a timeout loop I reset the registry key and try again and it works. No problem. The workaround works.

This has prompted me to ask this question in the forums here:

What is checking the box automatically? AutoIt? Microsoft? the web site?

This is just a question I'm left scratching my head about. Any clues or a way to find out?

Share this post

Link to post
Share on other sites

can you add the code that have problem ???

Share this post

Link to post
Share on other sites

ok, here's some code:

$FileName1 = @YEAR & @MON & @MDAY & "-" & @HOUR & @MIN & @SEC & "-FILE.CSV"
while $stat = 0
   $stat=WinWaitActive("Download complete","",120)
   ;check file size
   ;outlog("File Size = " & $bytes & " bytes")
   if $bytes < 128 Then
   if $stat=0 then
   ;Failure to download in 120 seconds or file size problem
          ;set newfile name to try again
   $FileName1 = @YEAR & @MON & @MDAY & "-" & @HOUR & @MIN & @SEC & "-FILE.CSV"

;Copy the File to the common name file ($FileName2)
ControlClick("Download complete","",2)
Func Download1($InFile)
;Click Download
;outlog("Registry Setting = " & $sStatus)
WinWaitActive("File Download")
ControlClick("File Download","",4427)
;outlog("Save selected on File Download dialog")
;Enter Filename
;outlog($InFile & " entered into file download dialog")

Func SetRegEntry()
$sStatus=RegWrite("HKEY_CURRENT_USERSoftwareMicrosoftInternet ExplorerMain","NotifyDownloadComplete","REG_SZ","yes")
Return $sStatus

Share this post

Link to post
Share on other sites

The code above has the workaround applied. Sometimes the first time through the download complete dialog will not be shown. If the timeout (120 seconds) expires the registry key is written to and a retry will again display the download complete dalog. Just curious whos bug it is?

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