• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2800
  • Last Modified:

Finding Save as dialog box in IE 10

I am attempting to automate the download & processing of spreadsheets from a web-based system, using MS Access 2007, Windows 7 (64-bit)

I've found on the web techniques for automating the save As dialog box, but I suspect these techniques relate to older versions of IE.

In particular, the techniques rely on finding the dialog window using FindWindow("#32770","Save As")

For me this always returns 0 instead of the hWnd.

Is the class name "#32770" still correct (I imagine so!) and can someone tell me what the new window name is? Or is there an alternative (not using SendKeys)?
0
Amos_5-24
Asked:
Amos_5-24
  • 3
1 Solution
 
Amos_5-24Author Commented:
OK - I've now ascertained that the dialog window name is of course "Windows Internet Explorer" and managed to get a hWnd for it. However, it doesn't seem that the list of options are buttons - are they? How do I click the 'Save' or 'Save As' in code without resorting to SendKeys?
0
 
Amos_5-24Author Commented:
As nobody else seems to want to comment, I've now found out some more for myself. First, there's an excellent MS article  that I now can't find the link to (!) with a VB project that I've used to list all open windows. I edited it to start at the hWnd of one of the windows, and realised that the Save As button is a bit further down the hierarchy so I'm going to write a couple of recursive routines to get the hWnd of buttons etc that are descendants but not first generation children of the window one has found.

My only issue now is going to be how to wait for the download to have completed before going off & processing the downloaded file. I guess I'm going to have to examine the process but I'll have to do some testing on a large file to give me time.
0
 
Amos_5-24Author Commented:
OK - I'm disappointed that I had to solve this for myself, but I've written the recursive routines (one to search by ClassName & title, one just by class name), and I've found that in IE10 all I have to do is to look for "#32770", "View Downloads - Windows Internet Explorer". When this is available (hWnd <> 0) the download is finished.
I now need to do something similar for earlier versions of IE, but I'm closing the question. Can I award myself my own points? <g>
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now