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. 😉
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. 😀
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?
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.
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 😛
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!
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!
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.
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 🙂
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.
^ 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
^ 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
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.
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.
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
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 🙂
‘@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:
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:
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
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.
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?
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
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
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/
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 .
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)
‘@saamiyaar
There is nothing wrong with that line, have you tried to set a breakpoint at that line?
Do you still have the problem if the IM is already open?
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…
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
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)
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
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
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?
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.
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.
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?
Very Nice! It is a **LOT** cleaner too. I hope to learn how to bounce people. Thanks for all the effort put into it!
Review your modules. mdlPalInfo.vb for instance. The source shows how the room text is read and sent.
If it’s an integer why there’s a need for any kind of quotation mark?
Just reaturn number without quotes.
@Highway-Star wrote:
Clearly.
@Highway-Star wrote:
You can voice your opinion as long it is done in a respectful manner.
Rudeness will not be tolarated.
Excellent balti27, it works a treat.
I think I need to study more on this to see how it works.
Thanks again
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. 😉
Hi,
Is there chance for this source code to be updated?
Thank U.
Obviously, i’m not allowed to voice my opinion, when others can, so ram it!!!
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. 😀
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?
🙂 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 🙂
@locohacker wrote:
After the holidays maybe.
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.
@deeva2 wrote:
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 😛
‘@Deeva You Go Girl :D, Proud of you
@Auto-Pilot thanks, I am also in that section bro lol
@deeva2 wrote:
As long as you provide the correct class, the room selector will work just fine.
@deeva2 wrote:
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!
@ChiNa-Man wrote:
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!
Nice try hiding your nick LOL
@Chike wrote:
lol yep i failed!!!!!!
@deeva2 wrote:
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.
Chike man the work it requires will mean I have to spend a whole month on it lol no even the holidays is enough
@locohacker wrote:
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
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 🙂
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.
^ 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
@Departure wrote:
I didn’t mean that clean, just get rid of duplicats would be a good start
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.
Lol man cleaning would take for ever and i don’t remember what texbox goes for what is like reading the whole code line by line 🙂
@locohacker wrote:
that is why you rename as you go, giving them meaningful names
Here is the code with Chike changes it works with paltalk 11 too Thanks Chicke 🙂
The code doesn’t seem to be able to send text on Paltalk Version 11.1 build 537. can someone please confirm this?
hello chike …im download but run is file not found …plz help me
@Chike wrote:
Thanks Chike, your version works for PT 11.1 build 537
@aidayvaypakon wrote:
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.
@aidayvaypakon wrote:
This is not the bot it’s the source code, it needs to be built with VB.NET 2010 or above.
@Johnny5 wrote:
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.
Source Updated to work with paltalk build 530 🙂
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:
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
to do so but I still don’t have full controll over it cuz I don’t know how those methods work
any hints?
Ah is cause you need to do some changes to the indexes in the mdlPalInfo.vb module like this
You see the sendtext is now 2 and the readtext is now 3 🙂
‘@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:
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:
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:
Good luck and feel free to ask… If anything…
The bot isnt working in paltalk 10.4 So far I’ve changed the nickclass to this
y
Anyone else find anymore changes?
looks like the indexes changed for both the send and read text windows
Nice is working great I gonna test more this Monday AH I also needed to declare IsWindowVisible
Thanks alot man 🙂 no more updating hopefully heheh
@locohacker wrote:
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.
@Johnny5 wrote:
Can’t confirm, what about this?
This is the latest Update 🙂
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?
Hi Loco
Thank you for the code snippet, how do I read the flags from the user list? Please advise or show some sample code.
Oh my bad. Sorry Chike.
Thank you for the quick reply.
Will check and try now.
Lol but Chike is loco (crazy in spanish) lol umm maybe we can add like a Talk timer to the bot 🙂
When I said I’m no loco I meant both 😛
Or you can make mic protector that immediately reddot and post a warming to mic jumper, if it’s not an admin.
Easier to make than a timer
Hi Chike,
I got it and have read the flags. Thank you very much.
Lol you right Chike we both locos ehheh Hey you guys keep working on this I will be putting a timer on the bot thanks 🙂
A bit messy code eh?
The WriteProcessMemory was missing, duplicate unneeded call to VirtualAllocEx, i is not needed either
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
NicArray must be Nothing, check mdlSysListView.GetAllSLVItems code.
You have a debugger, use it.
Hi Chike
I checked the issue and resolved it.. Now everything working perfectly.
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
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/
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)
‘@saamiyaar
There is nothing wrong with that line, have you tried to set a breakpoint at that line?
Do you still have the problem if the IM is already open?
Can I ask for the updated source code that has a trivia TIMER on it? Because this version has no trivia timer. Thank you my friend LOCO!
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…
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 :
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
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
Hi Chike
Below is the updated code. It returns an empty string. What might be wrong?
@Highway-Star wrote:
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 :
@autopilot wrote:
I was told that indexes begin with 0. So if the tree is like this:
Then Sub is index of 0, SUB SUB is 1 and SUB SUB SUB is 2
Am I right?
@deeva2 wrote:
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.

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.
@autopilot wrote:
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
I’m no loco,
code to retrive item you can find in mdlSysListView.vb.
To get the image:
Note that LVM_GETITEMÂ is already defined but incorrectly