- This topic has 11 replies, 4 voices, and was last updated 17 years ago by Admin.
-
AuthorPosts
-
November 19, 2006 at 1:50 am #188230BattleStar-GalacticaMember
seem no new prog for pt, I’ll show you how to get user status in pt room (version 9.0) and use your imagination to make new proggy
copyleft nanomachine007 😆
November 19, 2006 at 2:49 pm #188241AdminAdministratorman you make the job so much easier Thanks 😆
December 11, 2006 at 8:50 pm #188240AdminAdministratorNano if ya got time, how I go about getting the first user name isntead of all the users 🙂 I cant figure it out so far 😥
December 11, 2006 at 9:37 pm #188239BattleStar-GalacticaMemberwhat do you mean, you wanna get the first nick in the room
SendMessage(lstviewhwnd, LVM_GETITEMTEXT, 0, ByVal pMyItemMemory)
December 11, 2006 at 10:07 pm #188238AdminAdministratoryeps, i just want the first nick 🙂 ah where i put that ❓
December 11, 2006 at 11:27 pm #188237BattleStar-GalacticaMemberhere is that function to get the nick by position
Public Function GetListviewItemByPos(ByVal lstviewhwnd As Long, ByVal item 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)
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, item, 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 = tmp2 & vbCr
MsgBox tmp2
'
'**************************************************
'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 GetListviewItemByPos = tmpString
End Function
use that function like this
firstnick= GetListviewItemByPos(hListview, 0)
December 12, 2006 at 9:46 am #188236BattleStar-GalacticaMemberif you are still stuck on that, just tell Me I will post a complete example about get first nick but I think u got it 😆
December 12, 2006 at 1:14 pm #188235AdminAdministratorExecellent man I think I got it is the code I suppose to use
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)
atla = GetWindow(wtlsplitterwindow, GW_CHILD)
atla = GetWindow(atla, GW_HWNDNEXT)
syslistview = FindWindowEx(atla, 0&, "syslistview32", vbNullString)
firstnick = GetListviewItemByPos(syslistview, 0)Works greattttttt thank a lot 😆
May 3, 2007 at 3:59 pm #188234methodMemberloco could you upload the complete working of this example. It has been long time i didn’t look at this.Thanks
May 3, 2007 at 6:19 pm #188233AdminAdministratorMethod, where ya being man 🙂 aigh i gonna try to do the code tomorrow for ya 🙂
May 3, 2007 at 6:52 pm #188232BeSt_Of_ALLMemberwow!!! nice man its interesting !!! 🙂
May 5, 2007 at 12:43 pm #188231AdminAdministratorHey that code still works for the new paltalk 🙂 what ya having problems with method?
-
AuthorPosts
- You must be logged in to reply to this topic.