Using JK's API SPY

This topic contains 35 replies, has 7 voices, and was last updated by  autopilot 12 years, 10 months ago.

  • Author
    Posts
    1 Star2 Stars3 Stars4 Stars5 Stars Rate it First!
  • #12984
    Administrator
    Posts: 4717

    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

    JK’s API SPY 5.1

    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 🙂

    #26013
    Member
    Posts: 4244

    umm…didnt syxx make a tut about this before?

    #26014
    Administrator
    Posts: 4717

    yeps it was even betta but ll his tut pics are gone 😥

    #26015
    Member
    Posts: 4244

    yea 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

    #26016
    Member
    Posts: 67

    its rock man thx for this its dam easy thx once again LOCO

    #26017
    Member
    Posts: 183

    men i suck i cant do it im lose lik always 🙄

    #26018
    Administrator
    Posts: 4717

    lol where you lost at 🙂 I know I get confuse with api myself but after a while u get the hand of it.

    #26019
    Member
    Posts: 183

    every were im lost 😕 what can i use thats ez?

    #26020
    Member
    Posts: 4244

    DUDE! 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…

    #26021
    Member
    Posts: 67

    i think loco explain it so nicely

    #26022
    Member
    Posts: 4244

    @locohacker 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… 😕

    #26023
    Member
    Posts: 4244

    I’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…

    #26024
    Administrator
    Posts: 4717

    YeaAnd, 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 🙂

    #26025
    Member
    Posts: 4244

    actually, 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…

    #26026
    Member
    Posts: 4244

    OK im confused now….Loco says one thing and Ghost says another thing…wuts the best way…. ❓

You must be logged in to reply to this topic.