convert sendkeys to send/post message for framenotificationbar/directuihwnd ?

bobkuhn

New Member
Joined
Nov 1, 2011
Messages
22
I'm trying to automate the Internet Explorer open-save-close download manager popup using Excel VBA.

Right now I know the following sendkeys works:

Code:
    ieframe = FindWindow("ieframe", "Report Output - Windows Internet Explorer provided by Cisco")
    framenotificationbar = FindWindowEx(ieframe, 0&, "frame notification bar", vbNullString)
    SetForegroundWindow framenotificationbar
    SendKeys "%O", True    ' send key ALT O

I'd rather use sendmessage or postmessage. I've been trying the following with no luck.
Code:
Dim WM_CHAR As Long
Dim wParam As Long
Dim lParam As Long
 
WM_CHAR = &H102
VK_MENU = &H12  'ALT key
 
wParam = &H4F     ' upper case O
 
lParam = &H8C             '0 repeat, alt key active, key being pressed
 
    ieframe = FindWindow("ieframe", "Report Output - Windows Internet Explorer provided by Cisco")
    framenotificationbar = FindWindowEx(ieframe, 0&, "frame notification bar", vbNullString)
    directuihwnd = FindWindowEx(framenotificationbar, 0&, "directuihwnd", vbNullString)
 
 
        temp = SendMessage(framenotificationbar, WM_CHAR, wParam, lParam)
        temp = PostMessage(framenotificationbar, WM_CHAR, wParam, lParam)
        temp = SendMessage(directuihwnd, WM_CHAR, wParam, lParam)
        temp = PostMessage(directuihwnd, WM_CHAR, wParam, lParam)

I've tried every variation on lparm that I could think of. Sendmessage always returns a value of 0 and postmessage always responds with a value of 1 (success).

The reason I've tried directuihwnd is because the spy program I'm using says directuihwnd is the handle of the popup with framenotificationbar being the parent.

Any help would be appreciated.

I'm running IE10 & Excel 2010

Bob
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.

Forum statistics

Threads
1,215,972
Messages
6,128,030
Members
449,414
Latest member
sameri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top