Skip to content

Departure

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 629 total)
  • Author
    Posts
  • #186414
    Departure
    Member

    Use break points to work out which line returns a null handle, then you can investigate further, each FindWindowEx should return a valid handle of your code is correct. I assume the original post with code was from Pat API spy? why not try another program and see of you get the same results? E.g I uploaded a HwndSpy program a few years ago here which will give the high Hierarchy of each component, use that to compare with what you have, it will even give you the “Index” number

    HwndSpy

    #186408
    Departure
    Member

    I would assume paltalk only accepts X amount of lines from a user in a given amount of time, otherwise it is treated as spamming, even if its only a *

    #181066
    Departure
    Member

    ^ You dickhead 😉

    #191014
    Departure
    Member

    What ever the “Viewer” component is, it is calling a function that doesn’t exist(Viewer.LoadString). You maybe using using a different  version of the component. E.g the code may have been written in an older version of Delphi or “Viewer” could be a 3rd party component that has been updated.

    Would need more information about the component viewer to help you any further.

    #186447
    Departure
    Member

    Is this for beyluxe? I think both Autopilot and myself have posted examples of getting text from beyluxe, look for autopilots posts concerning this component.

     

    //Edit

    Cant get Text from Room – Crown IM ?

    #186450
    Departure
    Member

    he would have us believe these are his girls…

     

    While the truth is these are more like them….

     

    moral of the story is… forget the bitches and get your coding on!!!

    #190219
    Departure
    Member

    Great videos man nice and clear and to the point. Why are Delphi languages use for paltalk apps ??? what language is paltalk ? Great work !! Thanks ;)

    No particular reason why Delphi was used for paltalk apps, its just my preference as I code in Delphi a lot more than I do in .net or C/C++. These tutorials should work for any language that supports the windows API’s and is probably best using C# or vb.net as there are a lot more online resources for these languages. Paltalk was coded in C++

     

    P.s

    if needed I can do the same tutorials in .net but I don’t promise best coding practices using the .net language as my .net knowledge is very limited

     

    P.s.s

    Tutorial #6 coming very soon and will be the topic of sending text to paltalk.

     

    The look ahead:

    The next tutorial is number 6 as I said above with sending text, Following that will be getting the list of nick names in the room. Then once that is covered we can start looking at building a fully working applications. First app using all the tutorials will be an Auto greeting app, the app will not use notifications as we would have already learnt how to get all the nicknames in a room, so it will have some advantages over current auto greeters offerings. From there I guess it will be the viewers choice of application they would like to see a tutorial on.

    #186452
    Departure
    Member

    Admin, its time for you to move over to vb.net if you haven’t already done so, AND!!! rewrite your code in more modular way, also use what chike advised with GetDlgCtrlID API, this will save you from ever needing to update your programs, well at least not for now anyway. doing this will give you more time to spend on the actual program and not having to update the base code for getting and receiving text due to Paltalk version updates. you might even have the time to “clean up” your code….

    #191023
    Departure
    Member

    Good work Chike…

    im still curious to know which API you are intercepting and modifying its flags I presume .

    #174670
    Departure
    Member

    nice work chike, was interested on how you did it, but I understand if you don’t want to share this information.

    for people wanting to use the dll without the “dll loader” program you can add the dll path in “HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWindowsAppInit_DLLs”

    this will make it load into every process that links to user32.dll, you could also modify the dll to detach if if the current process it is loaded from is not = to paltalk.exe, this way it doesn’t have to be system wide hook which could affect other programs. But of cause I don’t know if this will affect other programs using the same control as we haven’t seen the source code. I guess the “active” variable is good enough to prevent this from happing anyway.

    #174674
    Departure
    Member

    source code, or explanation on how it works? which API has been used if any to achieve this?

    just curious that’s all, not required by myself as I don’t use Paltalk enough for auto scrolling to be a problem.

    #190558
    Departure
    Member

    i didn’t try this yet but right now when I type 123 in the room I get this 123꧐첼ಬ

    you are missing the null termination char, this is why you are getting weird characters, which bring me to this…

    Declare Ansi Function SendMessage Lib “USER32” Alias “SendMessageA” (ByVal hwnd As IntPtr, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As StringBuilder) As Integer

    Dim strBuffer As New StringBuilder(1024)
    strBuffer.Append(Chr(1024 And 255))
    strBuffer.Append(Chr(1024 / 256))

    the part where you set the first char of the buffer is just stupid and so is the setting of the second char of the buffer, you need to set the buffer length the amount from  “EM_LINELENGTH” in which the first char in your buffer must be the amount of chars you are going to receive. setting the buffer to 1024 and then placing (1024 and 256) into the first char of the buffer is incorrect(equals 0 btw). all you are doing now is making a max amount of chars for the buffer which is why you are getting weird text and not terminating with a null char for the last buffer char.

    if you watch tutorial #5 I explain why and how this works…

    Paltalk Programming Tutorial Series[Video]

     

    Example

    Function TForm1.GetPalText(const HwndIncommingText: Hwnd): String;
    var
      iLineCount, iLineLength, iLineIndex: Integer;
      szBuffer: array of WideChar;
    begin
     
      if isWindow(HwndIncommingText) = True then
      begin
        iLineCount := Sendmessage(HwndIncommingText, EM_GETLINECOUNT, 0, 0) - 2;
        iLineIndex := Sendmessage(HwndIncommingText, EM_LINEINDEX, iLineCount, 0);
        iLineLength := Sendmessage(HwndIncommingText, EM_LINELENGTH, iLineIndex, 0);
     
        if iLineLength = 0 then
        begin
          Result := 'Fail Line Length';
          Exit;
        end;
     
        SetLength(szBuffer, iLineLength);
        Word(szBuffer[0]) := iLineLength;
        Sendmessage(HwndIncommingText, EM_GETLINE, iLineCount, LParam(szBuffer));
        szBuffer[iLineLength] := #0;
        Result := PWidechar(szBuffer);
     
        szBuffer := Nil;
      end
      else
        Result := 'Fail Hwnd';
    end;

    in your case something similar to this should work if vb.net is zero based arrays(if not just +1)

    Dim strBuffer As New StringBuilder(iLineLength) // or maybe im strBuffer As New StringBuilder(iLineLength + 1)
    strBuffer.Append(Chr(iLineLength))

    then after you have gotten the text with EM_GETLINE you must add a null termination to the last char in your buffer.

    maybe something like strBuffer.Insert(iLineLength,Chr$(0))

    #190566
    Departure
    Member

    Did you add a null termination char at the end of the “buffer”? also make variable for sendmessage which should give you the amount of chars copied and see if that matches correctly, if it does I would guess you need to add a null terminated char at the end of your “buffer”, I also suggest against making a static length buffer and create this dynamically.

    show us the whole function you wrote and we can maybe help a little more on what the problem could be.

    #190223
    Departure
    Member

    Finally… 5th Episode uploaded…

    #186473
    Departure
    Member

    I do remember that code you posted now that you mentioned it. I have tried the code I posted on paltalk and it works very good, but for me personally I don’t see the need for the overhead as my current method does the job, Currently I have to convert the rtf to a simple memory stream to keep the formatting when sending to paltalk, then I can use the standard WM_SETTEXT to actually send the formatted text.

     

    procedure TPalWindow.SendPalRTF(aRichEdit: TRichedit);
    var
      memStream: TMemoryStream;
      strList: TStringList;
    begin
        memStream := TMemoryStream.Create;
        strList := TStringList.Create;
        try
          memStream.Clear;
          aRichEdit.Lines.SaveToStream(memStream);
          memStream.Position := 0;
          strList.Clear;
          strList.LoadFromStream(memStream);
          SendText(AnsiString(strList.Text));
        finally
          memStream.Free;
          strList.Free;
        end;
    end;
Viewing 15 posts - 1 through 15 (of 629 total)