I have the below code which finds a window and presses an 'OK' button in it.
I want to run this using standalone VBScript. Can this be done?
While ie.Busy Or ie.ReadyState <> READYSTATE_COMPLETE
DoEvents
If ie.Busy Then
DoEvents
hWND = FindWindow(vbNullString, "Message from webpage")
If hWND <> 0 Then childHWND = FindWindowEx(hWND, ByVal 0&, "Button", "OK")
If childHWND <> 0 Then SendMessage childHWND, BM_CLICK, 0, 0
End If
Wend