Solved

Finding Save as dialog box in IE 10

Posted on 2013-05-23
3
2,486 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now