User Mike Higgins ( posted:

Thanks to the guys (carl et al) who built the DDE and made the windows api
stuff available, that did it. Basicly, using the windows API calls, I got
the desktop handle, then got the top child (in Z order) and cycled through
the windows looking for "Microsoft Internet Explorer" and then looked for
the ActiveX Object that is on the window.

Thanks again everyone for the help!

'$Include "WIN32_X.sbh"
'$Include "WIN32.sbh"

Sub Main
Dim Result%, fLoop%
Dim hWin&, lWinTextLen&, maxLength&, lRes&, lChild&
Dim wText$

maxLength = 30000
hWin = GetDesktopWindow()
lChild = GetWindow(hWin,GW_CHILD)

lWinTextLen = GetWindowText(lChild,wText,maxLength)
wText = String$(lWinTextLen + 1,"*")
lWinTextLen = GetWindowText(lChild,wText,maxLength)

If (lWinTextLen > 0) Then

If (InStr(1,wText,"Microsoft Internet Explorer",1) > 0) Then

Window SetContext, "Caption="&wText, ""

If (SQAFindObject("Type=HTMLActiveX;HTMLId=Player") =
sqaSuccess) Then

msgbox("Window Found!")
hWin = lChild
lChild = 0


msgbox("Found a browser window, but not the radio")

End If

End If

End If

lChild = GetWindow(lChild,GW_HWNDNEXT)
wText = ""
Loop While (lChild <> 0)

msgbox("Exiting, Handle: " & Trim$(Str$(hWin)))

End Sub