Get Edit Text from TeamViewer

Category: Application Features

Date: 02-16-2022

Return to Index


 
'Compilable Example:  (Jose Includes)
#Compile Exe
#Dim All
%Unicode=1
#Include "win32api.inc"
 
Function PBMain() As Long
   Local hTeamViewer, hEditID, hEditPSW As Dword, temp As WStringZ * 100, tmp$
   hTeamViewer = FindWindow("#32770", "TeamViewer")
   GetWindowText(hTeamViewer, temp, 100) : ? temp   'confirms that window has appropriate title
 
   '? Str$(SetWindowPos(hTeamViewer, %Null, 50, 50, 0, 0, %swp_nosize))  'fails
 
   hEditID = GetDlgItem(hTeamViewer, &H4E82)
   SendMessage hEditID, %WM_GetText, 100, StrPtr(tmp$)
   ? tmp$
 
   hEditPSW = GetDlgItem(hTeamViewer, &H4E83)
   SendMessage hEditPSW, %WM_GetText, 100, StrPtr(tmp$)
   ? tmp$
 
   'SendMessage hTeamViewer, %WM_SysCommand, %sc_Close, 0    'fails
End Function


created by gbSnippets
http://www.garybeene.com/sw/gbsnippets.htm