Skip to content
Home > Programming > Moudel > Reply To: Moudel

Reply To: Moudel

#190135
Admin
Administrator

Well this what I use for Build 34 for my module

Option Explicit
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Public Declare Function SendMessageByString Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long
Public Declare Function SendMessageLong& Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long)
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Const WM_SETTEXT = &HC
Public Const WM_LBUTTONDOWN = &H201
Public Const WM_LBUTTONUP = &H202
Public Const VK_SPACE = &H20
Public Const WM_KEYDOWN = &H100
Public Const WM_KEYUP = &H101
Public Const WM_CLOSE = &H10
Public Sub RoomSend(Text As String)
Dim mywindowclass As Long
Dim wtlsplitterwindow As Long
Dim atlc As Long
Dim atlaxwin As Long
Dim x As Long
Dim richedita As Long
mywindowclass = FindWindow("my window class", vbNullString)
wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString)
atlc = FindWindowEx(wtlsplitterwindow, 0&, "atl:004c4600", vbNullString)
atlaxwin = FindWindowEx(atlc, 0&, "atlaxwin71", vbNullString)
x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString)
richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString)
richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
Call SendMessageByString(richedita, WM_SETTEXT, 0&, Text$)
DoEvents
On Error Resume Next
AppActivate "Voice Group"
On Error Resume Next
AppActivate "Private Voice Group"
SendKeys "{ENTER}"
End Sub

And I call it with this on the command button

Call RoomSend(RichTextBox1.TextRTF)

But its using the Sendkeys Enter thhing which is not that best thing 🙂 I am still trying to figure out how to use the send text to group from te damn tool bar they using now, i keep on trying 🙂