VB 2008 Paltalk Integration

Here you will find tutorials that will help you with programming.

Re: VB 2008 Paltalk Integration

Postby NVYE » Thu Mar 19, 2009 12:26 pm


Well this is what I would do, first check and see if there is any new text.

Get: text count as long
If count <> match with the old text count, then there must be a new text.

Then get do a GET TEXT .. (otherwise you're just wasting resources).

Hope this helps :)
Add-on Bots for educational and amusement purposes:
http://www.vipbots.com

Website:
http://www.asktechguy.com
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 230
Joined: Fri Jun 10, 2005 11:29 pm

Re: VB 2008 Paltalk Integration

Postby autopilot » Thu Mar 19, 2009 5:02 pm

locohacker wrote:Thanks Auto :) I am working on a program now ehhehe, hey one thing how to go about getting the index to get the last line


in my apps, i made a function to return the handle for the outgoing chat and another for the incoming.
Code: Select all
    Private Function SendTxtHnd() As Integer ' Outgoing chat box
        Dim iHnd As Integer
        iHnd = mdlGetHnd.SubFormHndByClassNameWithMWClassWithPartialMWCaption(mdlPalInfo.ChatRoomClass, Me.CtrlRoomSelector1.RoomName, mdlPalInfo.SplitterClass, mdlPalInfo.SplitterIndex)
        iHnd = mdlGetHnd.SubFormHndByClassNameWithMWHnd(iHnd, mdlPalInfo.ChatTextClass, mdlPalInfo.SendTextIndex)
        Return iHnd
    End Function

    Private Function ReadTxtHnd() As Integer ' Incoming Chat Box
        Dim iHnd As Integer
        iHnd = mdlGetHnd.SubFormHndByClassNameWithMWClassWithPartialMWCaption(mdlPalInfo.ChatRoomClass, Me.CtrlRoomSelector1.RoomName, mdlPalInfo.SplitterClass, mdlPalInfo.SplitterIndex)
        iHnd = mdlGetHnd.SubFormHndByClassNameWithMWHnd(iHnd, mdlPalInfo.ChatTextClass, mdlPalInfo.ReadTextIndex)
        Return iHnd
    End Function

once you have the handle, you already know how to read the last line of text :-)
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby NVYE » Mon Mar 23, 2009 3:59 pm

nice ...
Add-on Bots for educational and amusement purposes:
http://www.vipbots.com

Website:
http://www.asktechguy.com
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 230
Joined: Fri Jun 10, 2005 11:29 pm

Re: VB 2008 Paltalk Integration

Postby locohacker » Fri Mar 27, 2009 7:11 pm

Na dont get it lol, I mean I am using this
Code: Select all
        Dim iHnd As Integer
        iHnd = mdlGetHnd.SubFormHndByClassNameWithMWClassWithPartialMWCaption(mdlPalInfo.ChatRoomClass, Me.CtrlRoomSelector1.RoomName, mdlPalInfo.SplitterClass, mdlPalInfo.SplitterIndex)
        iHnd = mdlGetHnd.SubFormHndByClassNameWithMWHnd(iHnd, mdlPalInfo.ChatTextClass, mdlPalInfo.ReadTextIndex)

        Me.RichTextBox2.Text = GetLastLineTextChat(iHnd)

with the old function
Code: Select all
    Public Function GetLastLineTextChat(ByVal hwnd As Integer) As String
        Dim lngCount As Integer
        Dim lngLength As Integer
        Dim strBuffer 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, strBuffer)
        GetLastLineTextChat = strBuffer

    End Function

Ah and shit don't work :)
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

Re: VB 2008 Paltalk Integration

Postby autopilot » Sat Mar 28, 2009 5:06 pm

i dont know why your having problems, but my guess is you dont have the correct handle to the textbox.

here is an API call i use
Code: Select all
Declare Function SendMessageString Lib "USER32" _
Alias "SendMessageA" (ByVal hwnd As Integer, _
ByVal wMsg As Integer, ByVal wParam As Integer, _
ByVal lParam As StringBuilder) As Integer


and here is a function that should give you the last line
Code: Select all
Public Function GetLastLineTextChat(ByVal hwnd As Integer) As String
    Dim iLastLine As Integer
    Dim strBuffer As New StringBuilder(255)
    'Get Line count
    iLastLine = SendMessage(hwnd, EM_GETLINECOUNT, 0, 0)
    'get line text
    Call SendMessageString(hwnd, EM_GETLINE, iLastLine - 2, strBuffer)
    Return strBuffer.ToString
End Function


and you would call it like
Code: Select all
Dim sChatText as String = GetLastLineTextChat(ReadTxtHnd)
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby Departure » Sat Mar 28, 2009 9:15 pm

nice to see you on the forums again autopilot ;)
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Re: VB 2008 Paltalk Integration

Postby locohacker » Sat Mar 28, 2009 10:31 pm

Great thanks it works, I did a newbie mistake forgot to to call the api lol 8) thanks
User avatar
locohacker
Site Admin
Site Admin
 
Posts: 4325
Joined: Fri Dec 31, 2004 6:59 pm

Re: VB 2008 Paltalk Integration

Postby autopilot » Mon Mar 30, 2009 2:43 pm

Departure wrote:nice to see you on the forums again autopilot ;)

i have been checking the forums, but have not had much to add LOL

i resopnd when they have questions for me though :twisted:
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby method » Fri Apr 03, 2009 5:02 pm

autopilot thanks for your code but could you tell me how to convert it to vb6? All i want to read the lastline from the room.Looking forward for your reply.Thanks
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Re: VB 2008 Paltalk Integration

Postby autopilot » Sat Apr 04, 2009 2:48 pm

method wrote:autopilot thanks for your code but could you tell me how to convert it to vb6? All i want to read the lastline from the room.Looking forward for your reply.Thanks

i dont do much vb6 coding and i sure dont write code in vb6 that i already did in vb2008. if you want it in vb6, convert it yourself (not a problem if you can write vb6 code).
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby NVYE » Tue Apr 07, 2009 2:12 pm

Nice ... Excellent ... thanks bro !!

Is donate to Autopilot Integrations link still working ? I want to donate some money toward your integration just to show my appreciations for all your hard works.
Add-on Bots for educational and amusement purposes:
http://www.vipbots.com

Website:
http://www.asktechguy.com
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 230
Joined: Fri Jun 10, 2005 11:29 pm

Re: VB 2008 Paltalk Integration

Postby autopilot » Tue Apr 07, 2009 9:19 pm

NVYE wrote:Nice ... Excellent ... thanks bro !!

Is donate to Autopilot Integrations link still working ? I want to donate some money toward your integration just to show my appreciations for all your hard works.

as far a i know the donate link works... my paypal account is still valid, so the link should be fine... have not gotten anything donated in a long time though :?
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby NVYE » Tue Apr 07, 2009 11:06 pm

Cool ... just donated (5US88407K6984701B). once again ... thank you for all your hard works.
Add-on Bots for educational and amusement purposes:
http://www.vipbots.com

Website:
http://www.asktechguy.com
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 230
Joined: Fri Jun 10, 2005 11:29 pm

Re: VB 2008 Paltalk Integration

Postby autopilot » Wed Apr 08, 2009 8:12 am

NVYE wrote:Cool ... just donated (5US88407K6984701B). once again ... thank you for all your hard works.

thank you... your support is much appreciated
User avatar
autopilot
Forum Moderator
Forum Moderator
 
Posts: 356
Joined: Sat Sep 23, 2006 7:19 pm

Re: VB 2008 Paltalk Integration

Postby NVYE » Wed Apr 08, 2009 10:25 pm

You're very welcome !!! cheers
Add-on Bots for educational and amusement purposes:
http://www.vipbots.com

Website:
http://www.asktechguy.com
User avatar
NVYE
imFiles Senior
imFiles Senior
 
Posts: 230
Joined: Fri Jun 10, 2005 11:29 pm

PreviousNext

Return to Programming Tutorials

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

cron