- This topic has 34 replies, 6 voices, and was last updated 18 years ago by Admin.
-
AuthorPosts
-
November 8, 2006 at 4:45 pm #190408AdminAdministrator
Aigh this is going to be a simple tutorial for using the api spy, now for this tutorial i will use example of codes from other programs 🙂
lets get started first get JK’s API SPY here
Now we going to use to actions for this tutorial but you will get the basic once u understand it,
We will find the text area of paltalk to send text to the paltalk room
open paltalk and also open the apy spy.
Now on api spy click on code generator you should be in this window then
Now you see the rounded yellow ball click on it and drag it to the paltalk text are, you know where you type the text after you drag it to the text area just let the mouse go then this code should come up on the righbox of the api spy.
Dim wtlsplitterwindow As Long, atl As Long, atlaxwin As Long Dim x As Long, richedita As Long wtlsplitterwindow = FindWindow("wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) wtlsplitterwindow = FindWindowEx(wtlsplitterwindow, 0&, "wtl_splitterwindow", vbNullString) atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00692658", vbNullString) atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString) x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString) richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString) richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString)
wallah thas the api for the text area.
Okie now we need to find the main window of the text area, which is the window where the text area is located,
now drang the yellow ball to the borders of the paltalk room window and you should get this code
Dim dlggroupchatwindowclass As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString)
Now what we are planning on doing at this point is send text so we will use this send string code, this where shit get tricky there many ways to do this but this is the simpliest, getting the apis is usually the hardest part of the coding, anyways we goign to use this code
Call SendMessageSTRING(richedita, WM_SETTEXT, 0&, Text1.Text)
Note Text1.Text will be the text are in our program that we’ll use to write the text we will send to the room.
okie now lets put the code together it should look like this
Dim wtlsplitterwindow As Long, atl As Long, atlaxwin As Long Dim x As Long, richedita As Long Dim dlggroupchatwindowclass As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString) wtlsplitterwindow = FindWindowEx(dlggroupchatwindowclass, 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) atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00692658", vbNullString) atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString) x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString) richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString) richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString) Call SendMessageSTRING(richedita, WM_SETTEXT, 0&, Text1.Text)
The important thing about coding with apis is putting things together like this part of the code for example we pu together the text area with the main window
wtlsplitterwindow = FindWindowEx(dlggroupchatwindowclass, 0, "WTL_SplitterWindow", vbNullString)
and we did the same thing with the SendMessageSTRING
Call SendMessageSTRING(richedita, WM_SETTEXT, 0&, Text1.Text)
you see how we added dlggroupchatwindowclass into the text are code, thas how we put it together, now to finalize it we want to also send the text to the room so we add to the code this
Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
so the final code should look like this
Dim wtlsplitterwindow As Long, atl As Long, atlaxwin As Long Dim x As Long, richedita As Long Dim dlggroupchatwindowclass As Long dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString) wtlsplitterwindow = FindWindowEx(dlggroupchatwindowclass, 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) atl = FindWindowEx(wtlsplitterwindow, 0&, "atl:00692658", vbNullString) atlaxwin = FindWindowEx(atl, 0&, "atlaxwin71", vbNullString) x = FindWindowEx(atlaxwin, 0&, "#32770", vbNullString) richedita = FindWindowEx(x, 0&, "richedit20a", vbNullString) richedita = FindWindowEx(x, richedita, "richedit20a", vbNullString) Call SendMessageSTRING(richedita, WM_SETTEXT, 0&, Text1.Text) Call SendMessageLong(richedita, WM_KEYDOWN, 13, 0&)
aigh the code is done all we need to do is declare the apis in this example we use this
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private 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 Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Private Declare Function SendMessageSTRING Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As String) As Long Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Const GW_CHILD = 5 Private Const GW_HWNDNEXT = 2 Private Const WM_GETTEXT = &HD Private Const WM_GETTEXTLENGTH = &HE Private Const WM_SETTEXT = &HC Private Const WM_KEYDOWN = &H100
check the attachment code to see how it goes all together 🙂
this shit still a little confusing but if you see the basics of first how to get the apis and then how to connect them together u will have abetta understanding 🙂November 8, 2006 at 6:52 pm #190442AdminAdministratorumm…didnt syxx make a tut about this before?
November 8, 2006 at 7:14 pm #190441AdminAdministratoryeps it was even betta but ll his tut pics are gone 😥
November 8, 2006 at 8:35 pm #190440AdminAdministratoryea it was good up to a point…until he lost me completely n i had no clue what to do…lol…..im gunna check this one out n see if i can understand it
November 8, 2006 at 8:56 pm #190439ii Rocky iiMemberits rock man thx for this its dam easy thx once again LOCO
November 8, 2006 at 10:14 pm #190438GODFATHER-GM_01Membermen i suck i cant do it im lose lik always 🙄
November 9, 2006 at 3:56 am #190437AdminAdministratorlol where you lost at 🙂 I know I get confuse with api myself but after a while u get the hand of it.
November 9, 2006 at 4:37 am #190436GODFATHER-GM_01Memberevery were im lost 😕 what can i use thats ez?
November 9, 2006 at 6:46 am #190435AdminAdministratorDUDE! THIS IS THE EASIEST FUCKING THING EVER MAN! IT DOESN’T GET MORE SIMPLE THAN THIS! pat or jks writes the code for you, anything else, you would have to write it yourself… go download Spy++ or something and see how that makes this look like nothing…
November 9, 2006 at 11:31 am #190434ii Rocky iiMemberi think loco explain it so nicely
November 11, 2006 at 3:22 am #190433AdminAdministrator@Admin wrote:
now drang the yellow ball to the borders of the paltalk room window and you should get this code
Dim dlggroupchatwindowclass As Long
dlggroupchatwindowclass = FindWindow("dlggroupchat window class", vbNullString)um…loco….im confused here…..i tried all diff things….n i dont get that code u posted…..can u please show a picture of that so i can see exactly wut ur talkin bout….cus i put it on the border of da room n i got diff code… 😕
November 11, 2006 at 4:00 am #190432AdminAdministratorI’m assuming that this tut was to send text to a room…
If it was, then the reason you’re getting something different, YeaAnd, is because you dragged it to the border of the window, which was retarded. You’re setting the windows text, meaning you have to drag the ring to where you would usually type, not the border of the window… Its impossible to type on the border of a window…
November 11, 2006 at 1:05 pm #190431AdminAdministratorYeaAnd, I see what your doing okie yes you need to do that too to get the main window, but you also need to get the api of the textbox, then you put it together 🙂
November 11, 2006 at 1:23 pm #190430AdminAdministratoractually, loco, it sounds like you found the window and then did DO EVENTS, right? because if you did, theres no reason to… all you really have to do is find the text area that you want to set the text for… so api’ing the window’s border is obsolete…
November 11, 2006 at 2:49 pm #190429AdminAdministratorOK im confused now….Loco says one thing and Ghost says another thing…wuts the best way…. ❓
-
AuthorPosts
Related
- You must be logged in to reply to this topic.