Avatar of KingSencat

asked on 

Trying to get a text from a 3rd party window application ( Visual Basic v6.0 and 500 points )

I have attached below the source code and a screenshot of winspector, i am trying  get a text from a 3rd party application window and for some reason i get a blank msgbox, what i am doing wrong?

screenshot winspcector:
Dim nHwnd As Long
Dim nEditHwnd As Long, mainContainerHwnd As Long, maincontainer2hwnd As Long
Dim nText As String * 256
nHwnd = FindWindow(vbNullString, "Mesa (heads up) - $0.50/$1 - No Limit Hold'em - Logged In As")
mainContainerHwnd = FindWindowEx(nHwnd, 0&, "FTCTableSlider", vbNullString)
maincontainer2hwnd = FindWindowEx(mainContainerHwnd, 0&, "FTCSlider", vbNullString)
nEditHwnd = FindWindowEx(maincontainer2hwnd, 0&, "Edit", vbNullString)
SendMessageSTRING nEditHwnd, WM_GETTEXT, 256, nText
msgbox ntext

Open in new window

Visual Basic ClassicVB Script

Avatar of undefined
Last Comment

8/22/2022 - Mon