Get PalTalk Room (ATL######)

You can talk about VB programming here

Get PalTalk Room (ATL######)

Postby Project SP » Sun Jul 30, 2006 10:25 pm


guyz. herez the easier method to get the atl without
worryin abt the changin that paltalk make..............

Code: Select all
Option Explicit

Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public 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 SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long

Public Const GW_CHILD = 5
Public Const GW_HWNDNEXT = 2
Public Const WM_GETTEXT = &HD
Public Const WM_GETTEXTLENGTH = &HE

Public Function PT8ATLCClassName(ATLCLASS As Long) As String

Dim ATLCLASSLNG As Long
Dim sBUF As String
Dim sBUFLEN As Long

ATLCLASSLNG = GetWindow(ATLCLASS, GW_HWNDNEXT)

sBUFLEN = 256
sBUF = Space$(sBUFLEN - 1)
sBUFLEN = GetClassName(ATLCLASSLNG, sBUF, sBUFLEN)

PT8ATLCClassName = Left$(sBUF, sBUFLEN)

End Function


and to make it work here iz de example

Code: Select all
Public Function GetRoomATL(PTRoom As String) As String
Dim ATL As Long
ATL = FindWindow("My Window Class", PTRoom)
ATL = FindWindowEx(ATL, 0, "WTL_SplitterWindow", vbNullString)
ATL = FindWindowEx(ATL, 0, "WTL_SplitterWindow", vbNullString)
ATL = FindWindowEx(ATL, 0, "WTL_SplitterWindow", vbNullString)
GetRoomATL = PT8ATLCClassName(ATL)
End Function
User avatar
Project SP
imFiles Junior
imFiles Junior
 
Posts: 98
Joined: Wed Nov 24, 2004 11:32 pm
Location: LOCALHOST

Postby method » Mon Jul 31, 2006 4:00 am

can not we get this using class name spy programs too?
method
imFiles Master
imFiles Master
 
Posts: 686
Joined: Tue Oct 18, 2005 11:12 am

Postby Departure » Mon Jul 31, 2006 7:12 am

nice work SP but i find it interesting you declare all thoses API's and consts when only half of them are needed (as what you have written in your code)

for example:

where is "SendMessage","GW_CHILD","WM_GETTEXTLENGTH","WM_GETTEXT"

I dont see them being used in your code but yet they are declared...

Anyway great job :O)
User avatar
Departure
Global Moderator
Global Moderator
 
Posts: 996
Joined: Thu Mar 17, 2005 11:26 am
Location: Australia

Postby Project SP » Mon Jul 31, 2006 12:15 pm

yeah. iknow.. those r de ones ull be usin to do anythin...
and i was workin on someother thins.....too ;)... i tried many other things.
but i copied someof it... pasted here......so.....hvfun
User avatar
Project SP
imFiles Junior
imFiles Junior
 
Posts: 98
Joined: Wed Nov 24, 2004 11:32 pm
Location: LOCALHOST


Return to Visual Basic Programming

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 0 guests

cron