Solved

Finding Save as dialog box in IE 10

Posted on 2013-05-23
3
2,555 Views
Last Modified: 2013-05-25
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
Comment
Question by:Amos_5-24
  • 3
3 Comments
 
LVL 1

Author Comment

by:Amos_5-24
ID: 39191636
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
 
LVL 1

Author Comment

by:Amos_5-24
ID: 39193610
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
 
LVL 1

Accepted Solution

by:
Amos_5-24 earned 0 total points
ID: 39196583
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question