Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Oct 2004
    Location
    USA
    Posts
    223
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Class and Title for Findwindow for IE (Excel 2010, IE9)

    Howdy!
    I hope someone can help me. Is there a list of the class and titles for different window types? Right now I'm looking for the Save As dialog box class and title for the Findwindow API, and for the Findwindowex API to get the pop up at the bottom of the IE window when I click Save As (the one that gives me three buttons: Open, Close, Cancel).
    Here are some more details - I'm trying to automate a very tedious task; saving files from a web interface (eRooms). The only way I've been able to do this (even manually) is to click on the file, let it open, then "save as" the file. Both URLDownloadToFile and WinHttpReq won't work for eRooms for reasons I don't really understand. They appear to work but I can't open the file they create so I'm trying to find an alternative. I have all the IE automation code in place to walk through the hierarchy, build the folder structure in my MyDocuments folder, and determine what type of file each file is. I have four primary files types; pdf, Excel, Word, and Outlook email files (.msg). I was able to get the pdf files saved because they open in the same instace of IE but it's a real kludge using send keys after getting to the window using .ExecWB to get to that save as window. When I try to open other file types they open in their respective applications and I get the orange bar at the bottom of the IE window. I can't figure out how to get to that. I have not been able to get the findwindow and findwindowex functions working for anything other than the sample code I found online for the Excel window. I have the hwnd for the IE object I'm working with but I can't get the findwindowex function to work to get the child window (I think that's what I need to do to get to that pop up).
    Any ideas?
    Thanks

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    3 Star Lounger
    Join Date
    Oct 2004
    Location
    USA
    Posts
    223
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I figured out a few things. For starters I was mixing up the class and title. I found code to create a spreadsheet of all the open windows and their relationship and other code showing how to use the findwindow and findwindowex APIs (though some of the code had bugs which made it tough). Many of the windows do not have any title (the code I found shows these as "N/A" but they are really null I think. Now I'm trying to figure out how to control the window now that I can get the handle of any window I want! Also, I still can't get to the orange bar at the bottom of the IE window. I'm not convinced that is a separate window.
    When I click on a link in my web page for a pdf it just opens in the same window. I can then use ExexWB to pop up the saveas window (I'm still using SendKeys for that but I'd like to change that). For other file types I either get the Orange bar at the bottom (.msg files that open in Outlook), or the Windows Internet Explorer "What do you want do with..." pop up. I have found some articles that say sendmessage doesn't work. I sure could use some help with figuring out how to click these buttons and how to control the orange bar buttons.
    I would appreciate any help or suggestions you can offer!
    Thanks

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •