Solved

Finding Save as dialog box in IE 10

Posted on 2013-05-23
3
2,654 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

738 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