73 thoughts on “Paltalk Bot Source Code VB .net 2010

  1. @Highway-Star wrote:

    Obviously, i’m not allowed to voice my opinion, when others can, so ram it!!!

    You can voice your opinion as long it is done in a respectful manner.
    Rudeness will not be tolarated.

  2. Very nice, where am I supposed to be looking at getting everything to appear in the room, nothing works on it.

    EDIT! Maybe I should have been a little clearer. Although many things work on it, it does not send to the room although it does appear on the users screen and without the users name on the left hand side as it should. Also, the first thing typed in on the paltalk window by the user enters after the original text, (but appears ok on other computers).

    There are a couple of things I have been tweaking like the player, a couple more buttons added to send the title of the song when a button is pressed rather that it entering when the song starts.
    All this is straight forward although im very new to programming. However, I just can’t figure out how the program relates to paltalk.

    Any pointers on that would be helpful.
    Thanks. ๐Ÿ˜‰

  3. I have download Your Paltalk Botvbf1.rar and check it with Patalk 10.3 build 490 but it does not work. Make that Paltalk Botvbf1.rar had changed. Can you give me a new source? Thanks locohacker. ๐Ÿ˜€

  4. Thank you Loco! Im just getting started with VB.Net, this is a treat. Thank you very much!
    Also, I notice this is about the only source from you I have in VB 2010 (which opens in my VB 2012). Do you have any updated sources for VB 2010?

  5. ๐Ÿ™‚ true cause is also a pain to fix the bugs when you don’t know what goes with what, I’ll see if I stop been a lazy asz and change it ๐Ÿ™‚

  6. Thanx Mista China ๐Ÿ™‚ Its working now. After pulling my hair out for days, I discovered the majorpalversion section of the code and learned that “case 10” means pal version 10, which mine was missing.

  7. @deeva2 wrote:

    After pulling my hair out for days, I discovered the majorpalversion section of the code and learned that “case 10” means pal version 10, which mine was missing.

    I used that back in the days when you could run both Pal8 and Pal9. I tipically dont use that code any more because Pal is only letting v10 connect. But it should have been a good learning experience for you and you should be much better at debugging now ๐Ÿ˜›

  8. @deeva2 wrote:

    Do you have a working source for the room selector with the latest pal version? Please help its urgent!

    As long as you provide the correct class, the room selector will work just fine.

  9. @deeva2 wrote:

    Thank you Loco! Im just getting started with VB.Net, this is a treat. Thank you very much!
    Also, I notice this is about the only source from you I have in VB 2010 (which opens in my VB 2012). Do you have any updated sources for VB 2010?

    This source is for vB2010, and it should work for you on vB 2012 and 2010. But if you think about a Particlar source then let us know!

  10. @ChiNa-Man wrote:

    @deeva2 wrote:

    Thank you Loco! Im just getting started with VB.Net, this is a treat. Thank you very much!
    Also, I notice this is about the only source from you I have in VB 2010 (which opens in my VB 2012). Do you have any updated sources for VB 2010?

    This source is for vB2010, and it should work for you on vB 2012 and 2010. But if you think about a Particlar source then let us know!

    Hey China, I tried to PM you but to no avail. I need help. I have autopilot’s palroomselector source code and I followed his integration instructions but the room selector isnt working. Maybe because the source is old?

    Do you have a working source for the room selector with the latest pal version? Please help its urgent!

  11. @Chike wrote:

    Nice try hiding your nick LOL

    lol yep i failed!!!!!!

    @deeva2 wrote:

    Or does it still depend?

    The index of a control from a parent is not a “property” but rather a count. When you try to find the control at a particular index, you can map parent to child from the top window all the way down to the control you are looking for, or you can enum the windows. When you enum, you are in control of the callback code (what the program does with each window handle that is enumerated), so the index is controlled by your code.

    While the index while enuming can be zero based, I have never seen examples of it done being zero based.

    But again, since the index (as a count from a parent) is not a property of the control, it is not defined by the control.

  12. @locohacker wrote:

    Source Updated to work with paltalk build 530 ๐Ÿ™‚

    Source corrected to work with any version + some bug fixes.
    Didn’t test it LOL you debug it

    EDIT: made a mistake there change IsVisible to IsWindowVisible

  13. Ah I forgot to change the declaration to IsWindowVisible K i gonna change it to Integer. The bot send and receives text, but I really didnt test it alot just for a few minutes. Well the indexes still the same and I use that for those stuff not the getchild I think ๐Ÿ™‚ and for this bot I dont use the user status yet, although Im thinking on putting a small timer talk timer in the future ๐Ÿ™‚

  14. Clean your code, at the winter maybe LOL
    I’ve looked at EnumChildWindows documentation and it says the return value is not use so I’ll post better code to make sure the handle was found.

  15. ^ agreeded about cleaning your code, you really need to give your components meaningful names instead of checkbox1, textbox1 ect.. and use variables with meaningful names where possiable

  16. @Departure wrote:

    ^ agreeded about cleaning your code, you really need to give your components meaningful names instead of checkbox1, textbox1 ect.. and use variables with meaningful names where possiable

    I didn’t mean that clean, just get rid of duplicats would be a good start

  17. Did some cleaning, and changed the way control window is found.
    I’m quite sure the marsaling is not needed, but did it anyway.
    Didn’t check if running.

  18. @locohacker wrote:

    cleaning would take for ever and i don’t remember what texbox goes for what

    that is why you rename as you go, giving them meaningful names

  19. @Chike wrote:

    @Johnny5 wrote:

    The code doesn’t seem to be able to send text on Paltalk Version 11.1 build 537. can someone please confirm this?

    Can’t confirm, what about this?

    Thanks Chike, your version works for PT 11.1 build 537

  20. @aidayvaypakon wrote:

    hello chike …im download but run is file not found …plz help me

    If you look at the code it try to load some text files from the Form Load method, those file are settings, designs, trivia questions and music list etc. make up your own.

  21. @aidayvaypakon wrote:

    hello chike …im download but run is file not found …plz help me

    This is not the bot it’s the source code, it needs to be built with VB.NET 2010 or above.

    @Johnny5 wrote:

    Thanks Chike, your version works for PT 11.1 build 537

    Should work with any version, but I only changed the room read/send text, and nicklist was changed before, for other rhings I don’t know.

  22. Hi,

    I am not a VB coder but I can understand it’s sayntax and make some changes. I am trying to understand how to get the text from the paltalk room window/private message and send them. I figure out a way for sending a text via using ChatRTB1 control and SendChat() method as follow:

    ChatRTB1.Text = "my message comes here"
    SendChat()

    I don’t know any other way to send text and write my custom formatting.

    I also want to read line by line but I have not figured that yet. I am using

    Dim hnd As IntPtr = ReadTxtHnd()

    to do so but I still don’t have full controll over it cuz I don’t know how those methods work

    any hints?

  23. Ah is cause you need to do some changes to the indexes in the mdlPalInfo.vb module like this

    Private _SendTextIndex As Integer
    Public ReadOnly Property SendTextIndex() As Integer
    Get
    Return 2
    End Get
    End Property
    
    Private _ReadTextIndex As Integer
    Public ReadOnly Property ReadTextIndex() As Integer
    Get
    Return 3
    End Get
    End Property

    You see the sendtext is now 2 and the readtext is now 3 ๐Ÿ™‚

  24. ‘@Deva Sorrry, My Private Message was Locked even befor I got the staff rank. But It should be open for you guys and other members to contact me, so my bad! Else simply ask below the Topics and everyone online here would answer you..

    About this line:

    Do you have a working source for the room selector with the latest pal version? Please help its urgent!

    You really dont have to be URGENT to learn on this forum. Trust me. You will need to take things one at a time. Because you wont learn it that easy anyway. I am still learning from the best on here. And I have learned to have patience. You need it too girl ๐Ÿ˜€

    And about the RoomSelector. I started using it also a few months ago, and its working fine. Just like AutoPilot said make sure that you have the right components added & vb classes to your form. Because as I can see in your form-load code you have to have the mdlpalinfo class added. Now you will have to add the complete class too…

    And as I could see in your previouse posts you were using this code:

    Me.CtrlRoomSelector1.SetWinClass(mdlPalInfo.ChatRoomClass)

    If you havnt uploaded or added any of the the other components and vb classes such as the mdlPalInfo.vb then MUST make sure to have the ChatRoomClass added to your form. Else you wont make it work.

    I suggest you dont make it hard for yourself, and instead add the mdlpalinfo.vb class to your and load it to your project! Because the ChatroomClass is added in the MdlPalinfo.vb and you cant run these to without eachother.. Else as I said you will have to add it all to your form …

    And if you have the ChatRoomClass in your forum, then you can simply use this code:

      Me.CtrlRoomSelector1.SetWinClass(ChatRoomClass)

    Good luck and feel free to ask… If anything…

  25. The bot isnt working in paltalk 10.4 So far I’ve changed the nickclass to this

    Public ReadOnly Property NicListClass() As String
    Get
    Return "ATL:00ADB508"
    End Get
    End Propert

    y

    Anyone else find anymore changes?

  26. looks like the indexes changed for both the send and read text windows

    Private _SendTextIndex As Integer
    Public ReadOnly Property SendTextIndex() As Integer
    Get
    ' Return 3
    Return 2
    End Get
    End Property
    
    Private _ReadTextIndex As Integer
    Public ReadOnly Property ReadTextIndex() As Integer
    Get
    ' Return 4
    Return 3
    End Get
    End Property

     

  27. Nice is working great I gonna test more this Monday AH I also needed to declare IsWindowVisible

    Public Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As IntPtr) As Boolean

    Thanks alot man ๐Ÿ™‚ no more updating hopefully heheh

  28. @locohacker wrote:

    Nice is working great I gonna test more this Monday AH I also needed to declare IsWindowVisible

    Public Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As IntPtr) As Boolean

    Thanks alot man ๐Ÿ™‚ no more updating hopefully heheh

    I declared IsVisible there you could just change the name, or change As Boolean to As Integer, it’s better IMO.
    The bot don’t send or read text? I didn’t see any refernces to GetChild to find them.
    Last time I checked v11 it was the same so it should work with all versions, I don’t know about the user status though.

  29. @Johnny5 wrote:

    The code doesn’t seem to be able to send text on Paltalk Version 11.1 build 537. can someone please confirm this?

    Can’t confirm, what about this?

  30. Hi Loco

    Thank you for the source code. are you still updating the code? I want to learn how to check who is on the mic and how many people have their hands raised. Any references or suggestions?

  31. Hi Chike
    Below is the updated code. It returns an empty string. What might be wrong?

    A bit messy code eh?
    The WriteProcessMemory was missing, duplicate unneeded call to VirtualAllocEx, i is not needed either

    Public Function GetSLVSelectedImageItem(ByVal lstviewhwnd As IntPtr) As String
    	Dim result As Integer
    	Dim myItem As LV_ITEMA
    	Dim pHandle As Integer
    	Dim pStrBufferMemory As Integer
    	Dim pMyItemMemory As Integer
    	Dim strBuffer() As Byte
    	Dim index As Integer
    	Dim tmpString As String = String.Empty
    	Dim ProcessID As Integer
    	Dim usernum, itemIndex As Integer
    	
    	itemIndex = SendMessage(lstviewhwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED)
    	usernum = SendMessage(lstviewhwnd, LVM_GETITEMCOUNT, 0, 0)
    	โ€˜**********************
    	โ€˜init the string buffer
    	โ€˜**********************
    	ReDim strBuffer(StringBufferLength)
    	โ€˜***********************************************************
    	โ€˜open a handle to the process and allocate item and string buffer
    	โ€˜***********************************************************
    	Call GetWindowThreadProcessId(lstviewhwnd, ProcessID)
    	pHandle = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, ProcessID)
    	pMyItemMemory = VirtualAllocEx(pHandle, 0, Len(myItem) + StringBufferLength, MEM_COMMIT Or MEM_RESERVE, PAGE_READWRITE)
    	pStrBufferMemory = pMyItemMemory + Len(myItem)
    	โ€˜************************************************************************************
    	โ€˜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_IMAGE Or LVIF_TEXT
    	myItem.iItem = itemIndex
    	myItem.iSubItem = 0
    	myItem.pszText = pStrBufferMemory
    	myItem.cchTextMax = StringBufferLength
    	โ€˜**********************************************************
    	โ€˜write the structure into the remote processโ€™s memory space
    	โ€˜**********************************************************
    	result = WriteProcessMemory(pHandle, pMyItemMemory, myItem, Len(myItem), 0)
    	โ€˜*************************************************************
    	โ€˜send the get the item message and write back the memory space
    	โ€˜*************************************************************
    	result = SendMessage(lstviewhwnd, LVM_GETITEM, 0, pMyItemMemory)
    	result = ReadProcessMemory(pHandle, pStrBufferMemory, strBuffer(0), StringBufferLength, 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))
    	Next index
    	tmpString = Trim(tmpString)
    	MsgBox(tmpString)
    	โ€˜**************************************************
    	โ€˜deallocate the memory and close the process handle
    	โ€˜**************************************************
    	result = VirtualFreeEx(pHandle, pMyItemMemory, 0, MEM_RELEASE)
    	result = CloseHandle(pHandle)
    	If Len(tmpString) > 0 Then GetSLVSelectedImageItem = tmpString
    		Return tmpString
     End Function
    

     

  32. Hi Chike and Loco

    Thank you for all the assistance. I have completed the code to get the mic status. But I get the following exception and nothing resolves it. Please assist.

    An unhandled exception of type ‘System.NullReferenceException’ occurred in Paltalk Bot.exe

    Additional information: Object reference not set to an instance of an object.

    Private Sub GetAllUserList()
    Dim i As Integer
    Dim NicArray() As String
    ‘Empty the listbox
    ListBox28.Items.Clear()
    ‘Add nics to a listbox
    Dim iHnd As IntPtr = mdlHnd.GetChild(ChatRoomClass, Me.CtrlRoomSelector1.RoomName, NicListID)
    If iHnd <> IntPtr.Zero Then
    NicArray = mdlSysListView.GetAllSLVItems(iHnd)
    If NicArray.Length > 0 Then ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  <————- This is the line with the exception
    For i = 0 To NicArray.Length – 1
    ListBox28.Items.Add(NicArray(i))
    Next
    End If
    End If
    End Sub

  33. BTW you can simply ListBox28.Items.AddRange(NicArray) instead of looping and probably get rid of the if too

    Hi Chike

    Thank you for the tip. I have another query. How do i lower hand and how do i get the handle for lowerhand ?

    Thank you

     

  34. There is no handle to lower hand. To lower hand or to reddot/unreddot etc. you need to select the nick send a WM_COMMAND, to the chat window I think. Bounce is more complicated because SendMessage is a blocking call and the bounce dialog need to be OKed, so PostMessage is used instead.
    See what command does it, the code for reddot should be there or you can search the forum.
    I once posted code(s) to find the commands at runtime
    https://www.imfiles.com/topic/how-to-find-paltalk-commands-at-runtime/

  35. Hi Chike

    I have successfully opened a IM window but having difficulty in sending a auto IM message. Below is the code i have generated but ts doesnt send the IM. Please assist. Thank you

     

    In below code, i select a list of names as playername and then open an IM window for their name .

    playername = ListBox30.Items(ListBox30.SelectedIndex)

    HighlightNic(playername)
    PostMessage(FindWindow(mdlPalInfo.ChatRoomClass, CtrlRoomSelector1.RoomName), WM_COMMAND, mdlPalInfo.IMfromRoomCommand, 0)

    ChatRTB1.Text = gamemsg
    imsentchat = GetChild(mdlPalInfo.ChatRoomClass, playername, mdlPalInfo.SendTextUD) <—–[[ The issue is here. The command doesnt get the IM window handle with the playername]]
    SendPalTxt(imsentchat, ChatRTB1.Rtf)

     

  36. Hi Loco

    Thank you for the source code. are you still updating the code? I want to learn how to check who is on the mic and how many people have their hands raised. Any references or suggestions?

    This worked with ver. 11.4, should work still. It’s in c++ but you can get the hang of it:

    The image parameter is the LVITEM.image field.

    The flag areย easier to test than the image code, e.g. if flags and user_flag_hand then…

    typedef enum {
    	user_flag_cam	= 0x00010000,
    	user_flag_hand	= 0x00020000,
    	user_flag_mic	= 0x00040000,
    	user_flag_dot	= 0x00080000,
    	user_flag_mute	= 0x00100000,
    	user_flag_hq	= 0x00200000,
    	user_flag_view	= 0x00100000,
    };
    
    static
    	int image_flags(int image) {
    		int flags = 0;
    		if (image >= 20) {
    			flags |= user_flag_hand;
    			image -= 20;
    		}
    		if (image >= 10) {
    			flags |= user_flag_mic;
    			image -= 10;
    		}
    		if (image >= 5) {
    			flags |= user_flag_dot;
    			image -= 5;
    		}
    		if (image == 4) {
    			flags |= user_flag_cam | user_flag_view;
    		} else if (image == 2) {
    			flags |= user_flag_cam | user_flag_hq;
    		} else if (image == 1) {
    			flags |= user_flag_cam;
    		}
    		return flags;
    	}

     

  37. Hi Chike

    I have changed the code as per your suggestion but then the string returned by the function is empty. what did i do wrong here? Thank you in advance.

    My code below :

    Public Function GetSLVSelectedImageItem(ByVal lstviewhwnd As IntPtr) As String
    Dim result As Integer
    Dim myItem As LV_ITEMA
    Dim pHandle As Integer
    Dim pStrBufferMemory As Integer
    Dim pMyItemMemory As Integer
    Dim strBuffer() As Byte
    Dim index As Integer
    Dim tmpString As String = String.Empty
    Dim ProcessID As Integer
    Dim usernum, itemIndex As Integer
    Dim i As Short
    itemIndex = SendMessage(lstviewhwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED)
    usernum = SendMessage(lstviewhwnd, LVM_GETITEMCOUNT, 0, 0)
    '**********************
    'init the string buffer
    '**********************
    ReDim strBuffer(StringBufferLength)
    '***********************************************************
    '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, StringBufferLength, 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_IMAGE
    myItem.iSubItem = 0
    myItem.pszText = pStrBufferMemory
    myItem.cchTextMax = StringBufferLength
    '**********************************************************
    '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)
    
    '*************************************************************
    '*************************************************************
    '*************************************************************
    i = itemIndex
    '*************************************************************
    'send the get the item message and write back the memory space
    '*************************************************************
    result = SendMessage(lstviewhwnd, LVM_GETITEM, i, pMyItemMemory)
    result = ReadProcessMemory(pHandle, pStrBufferMemory, strBuffer(0), StringBufferLength, 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))
    Next index
    tmpString = Trim(tmpString)
    '**************************************************
    '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 GetSLVSelectedImageItem = tmpString
    Return tmpString
    End Function
    End Module
  38. Sorry part of it is my fault, LVM_GETITEM call is a bit different, iItem need to be set.
    to gext both text and image

    myItem.mask = LVIF_IMAGE or LVIF_TEXT
    myItem.iItem = i
    myItem.iSubItem = 0
    ...
    myItem.pszText = pStrBufferMemory
    myItem.cchTextMax = StringBufferLength
    
    SendMessage(lstviewhwnd, LVM_GETITEM, 0, pMyItemMemory)

    To get the image only you don’t need pStrBufferMemory.

    Other things:
    According to documentantion VirtualAllocEx need to be called with MEM_COMMIT or MEM_RESERVE.
    You can save one call too VirtualAllocEx and one to VirtualFreeEx by allocation all tye memory needed at once

    pMyItemMemory = VirtualAllocEx(pHandle, 0, Len(myItem)+StringBufferLength, MEM_COMMIT or MEM_RESERVE, PAGE_READWRITE)
    pStrBufferMemory = pMyItemMemory+Len(myItem)
    ...
    result = VirtualFreeEx(pHandle, pMyItemMemory, 0, MEM_RELEASE)
  39. Hi Chike

    Below is the updated code. It returns an empty string. What might be wrong?

    Public Function GetSLVSelectedImageItem(ByVal lstviewhwnd As IntPtr) As String
    Dim result As Integer
    Dim myItem As LV_ITEMA
    Dim pHandle As Integer
    Dim pStrBufferMemory As Integer
    Dim pMyItemMemory As Integer
    Dim strBuffer() As Byte
    Dim index As Integer
    Dim tmpString As String = String.Empty
    Dim ProcessID As Integer
    Dim usernum, itemIndex As Integer
    Dim i As Short
    itemIndex = SendMessage(lstviewhwnd, LVM_GETNEXTITEM, -1, LVNI_SELECTED)
    usernum = SendMessage(lstviewhwnd, LVM_GETITEMCOUNT, 0, 0)
    '**********************
    'init the string buffer
    '**********************
    ReDim strBuffer(StringBufferLength)
    '***********************************************************
    '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, StringBufferLength, 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_IMAGE Or LVIF_TEXT
    myItem.iItem = i
    myItem.iSubItem = 0
    
    '**********************************************************
    'write the structure into the remote process's memory space
    '**********************************************************
    
    pMyItemMemory = VirtualAllocEx(pHandle, 0, Len(myItem) + StringBufferLength, MEM_COMMIT Or MEM_RESERVE, PAGE_READWRITE)
    pStrBufferMemory = pMyItemMemory + Len(myItem)
    
    '*************************************************************
    '*************************************************************
    '*************************************************************
    
    ' i = itemIndex
    '*************************************************************
    'send the get the item message and write back the memory space
    '*************************************************************
    myItem.pszText = pStrBufferMemory
    myItem.cchTextMax = StringBufferLength
    result = SendMessage(lstviewhwnd, LVM_GETITEM, 0, pMyItemMemory)
    ' result = SendMessage(lstviewhwnd, LVM_GETITEM, i, pMyItemMemory)
    
    result = ReadProcessMemory(pHandle, pStrBufferMemory, strBuffer(0), StringBufferLength, 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))
    Next index
    tmpString = Trim(tmpString)
    MsgBox(tmpString)
    '**************************************************
    'deallocate the memory and close the process handle
    '**************************************************
    result = VirtualFreeEx(pHandle, pMyItemMemory, 0, MEM_RELEASE)
    result = VirtualFreeEx(pHandle, pStrBufferMemory, 0, MEM_RELEASE)
    result = VirtualFreeEx(pHandle, pMyItemMemory, 0, MEM_RELEASE)
    result = CloseHandle(pHandle)
    If Len(tmpString) > 0 Then GetSLVSelectedImageItem = tmpString
    Return tmpString
    End Function
  40. @Highway-Star wrote:

    Very nice, where am I supposed to be looking at getting everything to appear in the room, nothing works on it.

    EDIT! Maybe I should have been a little clearer. Although many things work on it, it does not send to the room although it does appear on the users screen and without the users name on the left hand side as it should. Also, the first thing typed in on the paltalk window by the user enters after the original text, (but appears ok on other computers).

    There are a couple of things I have been tweaking like the player, a couple more buttons added to send the title of the song when a button is pressed rather that it entering when the song starts.
    All this is straight forward although im very new to programming. However, I just can’t figure out how the program relates to paltalk.

    Any pointers on that would be helpful.
    Thanks. ๐Ÿ˜‰

    U need to open mdlPalInfo.vb and in the #Region “Pal Indexes” find :

    Private _SendTextIndex As Integer
    Public ReadOnly Property SendTextIndex() As Integer
    Get
    Return ยด2 ' End Get
    End Property
    
    Private _ReadTextIndex As Integer
    Public ReadOnly Property ReadTextIndex() As Integer
    Get
    Return 3 ' End Get
    End Property
  41. @autopilot wrote:

    looks like the indexes changed for both the send and read text windows

    Private _SendTextIndex As Integer
    Public ReadOnly Property SendTextIndex() As Integer
    Get
    ' Return 3
    Return 2
    End Get
    End Property
    
    Private _ReadTextIndex As Integer
    Public ReadOnly Property ReadTextIndex() As Integer
    Get
    ' Return 4
    Return 3
    End Get
    End Property

    I was told that indexes begin with 0. So if the tree is like this:

    MAIN
    SUB
    SUB SUB
    SUB SUB SUB

    Then Sub is index of 0, SUB SUB is 1 and SUB SUB SUB is 2
    Am I right?

  42. @deeva2 wrote:

    I was told that indexes begin with 0. So if the tree is like this:

    MAIN
    SUB
    SUB SUB
    SUB SUB SUB

    Then Sub is index of 0, SUB SUB is 1 and SUB SUB SUB is 2
    Am I right?

    Weather the index is 0 based or 1 based depends on what type of index and the object.

    When you are talking about arrays, the starting index is always 0. But this is not an array, it is the count of an object on the form and is used within your window enum function. Since you create your own enum function, you can set the base to however you want it. In my enum coding, I found it easier to have a 1 based index.
    AutoHotKeySpy

    I like to use the AutoIt3 window spy that comes with AutoHotKey. It gives you the class name plus a 1 based index of the control that is below the mouse.

  43. @autopilot wrote:

    Weather the index is 0 based or 1 based depends on what type of index and the object.

    I like to use the AutoIt3 window spy that comes with AutoHotKey. It gives you the class name plus a 1 based index of the control that is below the mouse.

    Sorry autopilot, I didnt clarify. I meant when using JK’s API Spy in tree mode, the index begins at 0 or 1? Or does it still depend?

    Like

    seinfeld_superman
    SUB
    SUB of SUB
    SUB SUB of SUB
  44. I’m no loco,

    code to retrive item you can find in mdlSysListView.vb.

    To get the image:

    Const LVIF_IMAGE As Integer = &H2
    Const LVM_GETITEM As Integer = (LVM_FIRST + 5)
    
    myItem.mask = LVIF_IMAGE 
    myItem.iSubItem = 0
    
    ...
    
    SendMessage(lstviewhwnd, LVM_GETITEM, i, pMyItemMemory)

    Note that LVM_GETITEMย  is already defined but incorrectly

Leave a Reply

You must Register or Login to comment on Paltalk Bot Source Code VB .net 2010