Skip to content
Home > Programming > Looking for code that reads paltalk user names on entry

Looking for code that reads paltalk user names on entry

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #187382
    method
    Member

    Hi all .Could any one point me to the source code that only reads user names when user enter the room . I am sure the code was part of one of bigger project here but i cant find it. I am looking for a code that is effective in busy rooms where the texts scroll rapidly.

    #187395
    String
    Member

    You might find an example in this source..

    #187394
    Chike
    Member

    Subclassing the control makes it easy

    LRESULT
    
    APIENTRY UserListProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
    
    {
    
    WNDPROC wndprocPrev = get_prev_wndproc(hwnd);
    
    switch (uMsg) {
    
    case LVM_DELETEITEM:
    
    break;
    
    case LVM_SETITEM: {
    
    LVITEM *pLVItem = (LVITEM*) lParam;
    
    user_entered(pLVItem->pszText);
    
    }
    
    break;
    
    default:
    
    ;
    
    }
    
    return CallWindowProc(wndprocPrev, hwnd, uMsg, wParam, lParam);
    
    }

    No scrolling text effects, never miss a name that’s on the list.
    I did suggest once a methid to reduce loss of lines retrived from text. It’s not full proof unless you clear the text every once in a while, because after some time the text is being cut from the top and there’s no way to tell how much exactly (unless you subclass the text control, then you can tell exactly how much is deleted) simple code too

    case EM_REPLACESEL:
    
    if (*LPCSTR(lParam) == 0) {
    
    DWORD start_sel = 0, end_sel = 0;
    
    CallWindowProc(wndprocPrev, hwnd, EM_GETSEL,
    
    WPARAM(&start_sel), LPARAM(&end_sel));
    
    if (start_sel == 0 && end_sel > 0) {
    
    last_index -= end_sel;
    
    }
    
    }
    
    break;
    #187393
    AhFox
    Member

    this looks interesting… any chance in VB.NET or C# ?

    #187392
    method
    Member

    Thanks all for replies. String i looked at that project but it is not working with paltalk 9.6 build 313 .chike i wish i knew about subclassing …

    The following code used to work but not now. Could any one tell me part should i change to make it work? I tried to use PAT or Jk’s spy 5.1 code generator but still i get zero for “MsgBox test & xxxxxxxxxxx”!! Hope you guys help me .Looking forward for replies.Thanks

     

    Function GetChatText(ByVal room As String)
    On Error Resume Next
    Dim atla As Long
    Dim atlaxwin As Long
    Dim X As Long
    Dim richedita As Long
    Dim Button As Long
    
    Dim xx As Long
    Dim xxx As Long
    Dim xxxx As Long
    Dim xxxxx As Long
    Dim xxxxxx As Long
    Dim xxxxxxx As Long
    Dim xxxxxxxx As Long
    Dim xxxxxxxxx As Long
    Dim xxxxxxxxxx As Long
    Dim xxxxxxxxxxx As Long
    Dim xxxxxxxxxxxx As Long
    Dim xxxxxxxxxxxxx As String
    
    mywindowclass = FindWindow("DlgGroupChat Window Class", room)
    
    xx = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString)
    xxx = FindWindowEx(xx, 0&, "wtl_splitterwindow", vbNullString)
    xxxx = FindWindowEx(xxx, 0&, "wtl_splitterwindow", vbNullString)
    xxxxx = FindWindowEx(xxxx, 0&, "wtl_splitterwindow", vbNullString)
    xxxxxx = GetWindow(xxxxx, GW_CHILD)
    xxxxxxx = GetWindow(xxxxxx, GW_HWNDNEXT)
    xxxxxxxx = FindWindowEx(xxxxxxx, 0&, "atlaxwin71", vbNullString)
    xxxxxxxxx = FindWindowEx(xxxxxxx, xxxxxxxx, "atlaxwin71", vbNullString)
    xxxxxxxxxx = FindWindowEx(xxxxxxxxx, 0&, "#32770", vbNullString)
    xxxxxxxxxxx = FindWindowEx(xxxxxxxxxx, 0&, "richedit20a", vbNullString)
    
    GetChatText = GetRoomText(xxxxxxxxxxx) 'getlastlinecontroltext(richedita)
    
    MsgBox test & xxxxxxxxxxx
    End Function
    Function GetRoomText(Ihwnd As Long) As String
    Dim Textlen As Long
    Dim Text As String
    Textlen = SendMessage(Ihwnd, WM_GETTEXTLENGTH, 0, 0)
    If Textlen = 0 Then
    GetRoomText = "Enter a Room"
    Exit Function
    End If
    Textlen = Textlen + 1
    Text = Space$(Textlen)
    Textlen = SendMessage(Ihwnd, WM_GETTEXT, Textlen, ByVal Text)
    GetRoomText = Left$(Text, Textlen)
    End Function
    #187391
    Chike
    Member

    @NVYE wrote:

    this looks interesting… any chance in VB.NET or C# ?

    This code run in paltalk process, so VB.NET or C# are not the languages for the task.
    It can be used by and comunicate with a VB.NET or C# application.

    #187390
    AhFox
    Member

    This code run in paltalk process, so VB.NET or C# are not the languages for the task.
    It can be used by and comunicate with a VB.NET or C# application.

    Sounds like a class library in C++. If you don’t mind can you upload the dll file and show us how to use it.

    I have a very lack knowledge on C++ for the WIN processes hooking. I’m wondering is it comparable with WIN32 and 64 bit ? thanks

    #187389
    Chike
    Member

    @NVYE wrote:

    Sounds like a class library in C++. If you don’t mind can you upload the dll file and show us how to use it.

    I have a very lack knowledge on C++ for the WIN processes hooking. I’m wondering is it comparable with WIN32 and 64 bit ? thanks

    Not a class library, but API to comunicate with paltalk.
    At it’s current state it would be a bit complex to use in basic. It uses callbacks to send messages from paltalk to the application. The messages are sent over pipes and recived in a differe native thread and require delegates co be sent to the form.
    I can make a simpler DLL that will comunicate using EM_COPYDATA and will be much easier to use in VB.NET

    #187388
    AhFox
    Member

    What is the performance for this API do you know? Is it any faster than using the regular get Text?

    #187387
    method
    Member

    NVYE can you show me a working example of get Text for paltalk 9.6 build 313 and a way to send text too room too ? All old methods stoped working !!

    #187386
    Chike
    Member

    Of course it’s faster, let alone reliable. To begin with, t doesn’t poll, everything is done only when needed.
    At most there is one context awitch and data copy between processes per event.
    Paltalk send over 50 messages to insert of one line in text, current code use 6 to retrive it so it’s not more then 10% overhead to paltalk which is by itself very little.

    #187385
    AhFox
    Member

    method, if you use Paltalk integration from autopilot … it is working fine. He also provided you with source code. Make sure you check it out. It contained a bunch of useful information. I’m currently using his library for some of my programs.

    #187384
    method
    Member

    @NVYE wrote:

    method, if you use Paltalk integration from autopilot … it is working fine. He also provided you with source code. Make sure you check it out. It contained a bunch of useful information. I’m currently using his library for some of my programs.

    Thanks for suggesting that..Could you point me to which one you are refaring ? I tried a few non worked !!

    #187383
    AhFox
    Member

    Here is the direct link:

    VB 2008 Paltalk Integration

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.