得不到"查看下载 - Windows Internet Explorer")的"保存"按钮的句柄.
请问易做图:如何才能获得IE9下载框里的那个保存按钮的句柄?现在只能获得下载作体的句柄,本来用sendkeys "{Enter}"来自动下载,下一个时段的时候会自动打开.该如何解决?Static CurrentHwnd As Long
Dim ForegroundWindowHwnd As Long
ForegroundWindowHwnd = GetForegroundWindow()
'MsgBox ForegroundWindowHwnd
CurrentHwnd = FindWindow("#32770", "查看下载 - Windows Internet Explorer")
If CurrentHwnd > 0 And ForegroundWindowHwnd = CurrentHwnd Then
MsgBox ForegroundWindowHwnd
thwnd = FindWindowEx(dhwnd, ByVal 0&, "DirectUIHWND", vbNullString)
If thwnd <> 0 Then
SendKeys "{Enter}"
SendKeys "%L"
Delay 5000
'SendMessage thwnd, WM_CLOSE, 0, 0
End If
End If
得不到"查看下载 - Windows Internet Explorer")的当前句柄.
补充:VB , API