- This topic has 17 replies, 6 voices, and was last updated 12 years ago by GODFATHER-GM_01.
-
AuthorPosts
-
December 4, 2006 at 5:25 pm #190385AdminAdministrator
Aigh this gonna be a short but very interesting tutorials, most of the material prob had being cover by departure, nano and sp I am just going to put it here so its all together 🙂
Aigh in this tutorial we will learn how to send text, retrieve the last line of the paltalk chat room, get all nicks from paltalk roon list and click on lock mic.
First of all you will need a big module lol, in your program add this module
Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcId As Long) As Long Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long Private Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal dwFreeType As Long) As Long Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, ByRef lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByRef lParam As Any) As Long Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private 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 Private Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long Private Declare Function SendMessageStr Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, 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) Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Public Const WM_GETTEXT = &HD Private Const WM_KEYDOWN = &H100 Public Const WM_SETTEXT = &HC Public Const WM_LBUTTONDOWN = &H201 Public Const WM_LBUTTONUP = &H202 Public Const WM_GETTEXTLENGTH = &HE Private Const EM_GETLINECOUNT = &HBA Private Const EM_GETLINE = &HC4 Private Const PROCESS_QUERY_INFORMATION = 1024 Private Const PROCESS_VM_OPERATION = &H8 Private Const PROCESS_VM_READ = &H10 Private Const PROCESS_VM_WRITE = &H20 Private Const STANDARD_RIGHTS_REQUIRED = &HF0000 Private Const MAX_LVMSTRING As Long = 255 Private Const MEM_COMMIT = &H1000 Private Const PAGE_READWRITE = &H4 Private Const LVIF_TEXT As Long = &H1 Private Const MEM_RELEASE = &H8000 Private Const LVM_FIRST = &H1000& Private Const LVM_GETITEMCOUNT = LVM_FIRST + 4 Private Const LVM_GETITEMTEXT As Long = (LVM_FIRST + 45) Private Const GW_CHILD = 5 Private Const GW_HWNDNEXT = 2 Private Const LVIF_IMAGE = &H2 Private Const LVIF_STATE = &H8 Private Const LVM_GETITEM As Long = (LVM_FIRST + 5) Private Type LV_ITEMA mask As Long iItem As Long iSubItem As Long state As Long stateMask As Long pszText As Long cchTextMax As Long iImage As Long lParam As Long iIndent As Long End Type Dim mywindowclass As Long, wtlsplitterwindow As Long, atldd As Long, atla As Long Dim syslistview As Long Public Function GetListviewItem(ByVal lstviewhwnd As Long) As String Dim result As Long Dim myItem As LV_ITEMA Dim pHandle As Long Dim pStrBufferMemory As Long Dim pMyItemMemory As Long Dim strBuffer() As Byte Dim index As Long Dim tmpString, tmp2 As String Dim strLength As Long Dim ProcessID As Long Dim ItemCount, i As Long '********************** 'init the string buffer '********************** ReDim strBuffer(MAX_LVMSTRING) '*********************************************************** 'open a handle to the process and allocate the string buffer '*********************************************************** Call GetWindowThreadProcessId(lstviewhwnd, ProcessID) pHandle = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, ProcessID) pStrBufferMemory = VirtualAllocEx(pHandle, 0, MAX_LVMSTRING, MEM_COMMIT, PAGE_READWRITE) '************************************************************************************ 'initialize the local LV_ITEM structure 'The myItem.iSubItem member is set to the index of the column that is being retrieved '************************************************************************************ myItem.mask = LVIF_TEXT myItem.iSubItem = 2 myItem.pszText = pStrBufferMemory myItem.cchTextMax = MAX_LVMSTRING '********************************************************** 'write the structure into the remote process's memory space '********************************************************** pMyItemMemory = VirtualAllocEx(pHandle, 0, Len(myItem), MEM_COMMIT, PAGE_READWRITE) ItemCount = SendMessage(lstviewhwnd, LVM_GETITEMCOUNT, 0&, 0&) For i = 0 To ItemCount - 1 result = WriteProcessMemory(pHandle, pMyItemMemory, myItem, Len(myItem), 0) '************************************************************* 'send the get the item message and write back the memory space '************************************************************* result = SendMessage(lstviewhwnd, LVM_GETITEMTEXT, i, ByVal pMyItemMemory) result = ReadProcessMemory(pHandle, pStrBufferMemory, strBuffer(0), MAX_LVMSTRING, 0) result = ReadProcessMemory(pHandle, pMyItemMemory, myItem, Len(myItem), 0) '************************************************** 'turn the byte array into a string and send it back '************************************************** For index = LBound(strBuffer) To UBound(strBuffer) If Chr(strBuffer(index)) = vbNullChar Then Exit For tmpString = tmpString & Chr(strBuffer(index)) tmp2 = tmp2 & Chr(strBuffer(index)) Next index tmp2 = Replace(tmp2, "@", "") Form1.List1.AddItem tmp2 tmp2 = "" Next ' '************************************************** 'deallocate the memory and close the process handle '************************************************** result = VirtualFreeEx(pHandle, pStrBufferMemory, 0, MEM_RELEASE) result = VirtualFreeEx(pHandle, pMyItemMemory, 0, MEM_RELEASE) result = CloseHandle(pHandle) If Len(tmpString) > 0 Then GetListviewItem = tmpString End Function Public Function NickGet() Dim dlggroupchatwindowclass As Long, wtlsplitterwindow As Long, atldd As Long Dim syslistview As Long On Error Resume Next dlggroupchatwindowclass = FindWindow("DlgGroupChat Window Class", vbNullString) wtlsplitterwindow = FindWindowEx(dlggroupchatwindowclass, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) atldd = GetWindow(wtlsplitterwindow, GW_CHILD) atldd = GetWindow(atldd, GW_HWNDNEXT) syslistview = FindWindowEx(atldd, 0&, "syslistview32", vbNullString) Call GetListviewItem(syslistview) End Function Sub RoomSend(Text As String) Dim parent, child, alt, rich20 As Long parent = FindWindow("DlgGroupChat Window Class", vbNullString) child = FindWindowEx(parent, 0, "WTL_SplitterWindow", vbNullString) child = FindWindowEx(child, 0, "WTL_SplitterWindow", vbNullString) child = FindWindowEx(child, 0, "WTL_SplitterWindow", vbNullString) child = FindWindowEx(child, 0, "WTL_SplitterWindow", vbNullString) alt = GetWindow(child, GW_CHILD) alt = FindWindowEx(alt, 0, "AtlAxWin71", vbNullString) alt = FindWindowEx(alt, 0, "#32770", vbNullString) rich20 = FindWindowEx(alt, 0, "RichEdit20A", vbNullString) rich20 = FindWindowEx(alt, rich20, "RichEdit20A", vbNullString) Call SendMessageSTRING(rich20, WM_SETTEXT, 0&, Text$) Call SendMessageLong(rich20, WM_KEYDOWN, 13, 0&) End Sub Public Function GetLastLineTextChat(ByVal hwnd As Long) As String Dim lngCount As Long Dim lngLineIndex As Long Dim lngLength As Long Dim strBuffer As String Dim strRichText As String 'Get Line count lngCount = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0) lngLength = SendMessage(hwnd, EM_LINELENGTH, lngCount - 2, 0) 'resize buffer strBuffer = Space(256) 'get line text Call SendMessageStr(hwnd, EM_GETLINE, lngCount - 2, ByVal strBuffer) GetLastLineTextChat = strBuffer End Function Public Function GetLastLine() On Error Resume Next Dim mywindowclass As Long Dim wtlsplitterwindow As Long Dim atlfe As Long Dim atlaxwin As Long Dim x As Long Dim richedita As Long mywindowclass = FindWindow("DlgGroupChat Window Class", vbNullString) wtlsplitterwindow = FindWindowEx(mywindowclass, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) atlfe = GetWindow(wtlsplitterwindow, GW_CHILD) atlaxwin = FindWindowEx(atlfe, 0&, "atlaxwin71", vbNullString) atlaxwin = FindWindowEx(atlfe, atlaxwin, "atlaxwin71", vbNullString) x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString) richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString) Form1.Text1.Text = GetLastLineTextChat(richedita) End Function
Aigh on the gor you will need to add two text boxes 5 command buttoms and one lsit box and add this to your form, erase everything just replace it with this
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetMenu Lib "user32" (ByVal hwnd As Long) As Long Private Declare Function GetMenuItemID Lib "user32" (ByVal hMenu As Long, ByVal _ nPos As Long) As Long Private Declare Function GetSubMenu Lib "user32" (ByVal hMenu As Long, ByVal _ nPos As Long) As Long Private Declare Function SendMessageA Lib "user32" (ByVal hwnd As Long, ByVal _ wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private 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 Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Const WM_COMMAND = &H111 Private Sub Command1_Click() Call NickGet End Sub Private Sub Command2_Click() Call GetLastLine End Sub Private Sub Command3_Click() Call RoomSend(Text2) End Sub Private Sub Command4_Click() Dim window As Long Dim dlggroupchatwindowclass As Long Dim x As Long, editx As Long Dim Button As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString) PostMessage dlggroupchatwindowclass, WM_COMMAND, 33340, 0 End Sub Private Sub Command5_Click() Dim window As Long Dim dlggroupchatwindowclass As Long Dim x As Long, editx As Long Dim Button As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString) PostMessage dlggroupchatwindowclass, WM_COMMAND, 33343, 0 End Sub Private Sub Form_Load() End Sub
lol thats it now u can do all those function for paltalk 9 🙂
here is the final code more thing might be added in the furture 🙂December 5, 2006 at 1:58 pm #190402GODFATHER-GM_01Memberyo thanks loco i cant check it out now because i dont got my pc wit vb6 in it but when ever i get my pc i will check it thanks loco and 1 more thing is that code in it to work with all builds?
December 5, 2006 at 2:17 pm #190401AdminAdministratoronly with all paltalk 9s I hope paltalk dont change nothing so it will work even with the new paltalk 9s in the feauture 8)
December 6, 2006 at 3:05 am #190400GODFATHER-GM_01Memberwell the new paltalk is out so maybe now its changed? we got to see
December 6, 2006 at 3:09 am #190399AdminAdministratorI doubt its changed at all.
Why don’t you go look?
December 6, 2006 at 1:49 pm #190398AdminAdministratornop still the same 🙂 thank god lol 😆
December 8, 2006 at 7:05 pm #190397Sabotage2Membergood job Admin 😀
December 8, 2006 at 8:16 pm #190396AdminAdministratorAdmin sucks when it comes to programming just look at his code any real programmer would see the mess in his code and laugh. its all snipplets half the code is not being used by anything yet he has the code in a module…
December 9, 2006 at 3:29 am #190395BattleStar-GalacticaMember@Dim ZaraByte As String wrote:
Admin s***ks when it comes to programming just look at his code any real programmer would see the mess in his code and laugh. its all snipplets half the code is not being used by anything yet he has the code in a module…
zara byte you alway give bad comment to loco, we all know who know coding or not, yeah loco is suck but you are not better, this forum is not a programming forum, it’s just a forum to make some crappy fun tool for paltalk and play around. Do you have nothing to do in your life except give some stupid comment 😈 👿
December 9, 2006 at 4:53 pm #190394Sabotage2Member@Dim ZaraByte As String wrote:
Admin s***ks when it comes to programming just look at his code any real programmer would see the mess in his code and laugh. its all snipplets half the code is not being used by anything yet he has the code in a module…
DIM ZARAA U SUCK U LOZER .. U TAKE MONEY ON UR SITE C UZ U JUST DONT HAVE MONEY FOR CONTINUE UR LIFE 😀
January 31, 2007 at 4:32 am #190393AdminAdministratorLOCO DO YOU HAVE ANY NEW CODES?
WELL I DID TRY BUT NONE CONNECTION WITH PALTALK
SO CAN YOU SEND MEE PALTALK CODES FOR 9.0 PLEAE:)January 31, 2007 at 6:24 pm #190392AdminAdministratorlike wha you want like a regular text sender, here the paltalk 9 funtext code its cool 🙂
February 4, 2007 at 3:53 pm #190391AdminAdministratorloco ur file is aint open maybe you did forget to make it Zipped or what ?
well i just need codes plz:)February 4, 2007 at 5:04 pm #190390AdminAdministratorMaybe you need to learn what a .rar file is.
February 9, 2007 at 4:18 am #190389BattleStar-GalacticaMemberI’m confused 🙄 when they dont know how to open a rar file, how can they code a program ❓
-
AuthorPosts
Related
- You must be logged in to reply to this topic.