08-04-20 07:28 PM
09-04-20 04:49 PM
10-04-20 01:00 AM
Hi Vincent,
Do you know how to manipulate IE popup by VBA?
If you know, the operation method using VBO is similar to the operation method using VBA.
this is VBA sample code:
Private Declare PtrSafe Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As LongPtr, ByVal wMsg As Long, ByVal wParam As LongPtr, ByVal lParam As LongPtr) As Long Declare PtrSafe Function FindWindow Lib "User32.dll" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Sub ClickPopup() Dim hwnd As Long hwnd = FindWindow("#32770", "Message from webpage") If hwnd <> 0 Then PostMessage hwnd, &H111&, vbOK, 0 End If End Sub
- create another VBO for popup
- spy popup in the same way as the parent IE window
- create attach action for popup
when attach popup,
- set "1" to "Child Index"
- set "Message from webpage" to "Window Title"
Then you spy OK or Cancel button in IE popup, "Parent Class Name" is "#32770".
If you create VBO for popup in this way, it can be used for other IE windows, as they do not depend on what the IE's parent window is.
hope this suggestion helps you
24-04-20 09:48 AM