Forum Replies Created
-
AuthorPosts
-
April 26, 2016 at 3:00 pm #186414DepartureMember
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
April 26, 2016 at 2:48 pm #186408DepartureMemberI 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 *
April 26, 2016 at 2:46 pm #181066DepartureMember^ You dickhead 😉
April 26, 2016 at 2:27 pm #191014DepartureMemberWhat 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.
December 27, 2014 at 10:18 am #186447DepartureMemberIs 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
December 26, 2014 at 5:26 pm #186450DepartureMemberhe 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!!!
December 26, 2014 at 5:08 pm #190219DepartureMemberGreat 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.
December 26, 2014 at 4:33 pm #186452DepartureMemberAdmin, 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….
December 21, 2014 at 5:11 am #191023DepartureMemberGood work Chike…
im still curious to know which API you are intercepting and modifying its flags I presume .
December 21, 2014 at 5:05 am #174670DepartureMembernice 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.
December 20, 2014 at 4:53 am #174674DepartureMembersource 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.
December 1, 2014 at 7:06 pm #190558DepartureMemberi 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…
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))
December 1, 2014 at 7:32 am #190566DepartureMemberDid 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.
November 21, 2014 at 7:17 am #190223DepartureMemberFinally… 5th Episode uploaded…
November 21, 2014 at 12:14 am #186473DepartureMemberI 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;
-
AuthorPosts