Results 1 to 11 of 11

Thread: I need alotof help

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7

    I need alotof help

    Alright well ive been trying to figure out how to do this for a long time and I've searched around and I guess I have alot of questions but I'll explain my problem first.

    Ok First off I have vb6.0 and im somewhat familar with how to get handles on programs and such but I am making a program and I want to add in AIM functions sort of, such as like when I click a button on my form, it opens aim, and types in my password and signs me in. I also want to know how to send text to other programs ive gone to yahoo and google and searched the postmessage and sendmessage api functions or whatever and i just cant seem to grasp what i need to do. I want to be able to output text from a text box, into other programs , but without using anything like sendkeys or key_bd input or whatever, cant i use postmessage to post the message to a certain field or something once it has focus?

  2. #2

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7
    Ah well i hope someone will find this eventually and actually help me because every one else received a response but me.

  3. #3
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    Dont worry, help will be on its way, besides its the weekend, most people are at the pub (i got tinnies).

    Anyway, did you search here, and the codebank? And Planet Source Code is worth a look.....

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7
    yea i searched around like i found something close to what i was looking for but the guy was like "oh nevermind i understand how to do this, thanks anyways "

    by the way thanks for the encouragement

  5. #5
    Super Moderator manavo11's Avatar
    Join Date
    Nov 2002
    Location
    Around the corner from si_the_geek
    Posts
    7,171
    To open a program the Shell function can be used (to open AIM)... To put text in a textbox there a few options : SendKeys, SetWindowText API, SendMessage API with WM_SETTEXT message. Try searching for these


    Has someone helped you? Then you can Rate their helpful post.

  6. #6
    Frenzied Member
    Join Date
    May 2003
    Location
    So Cal
    Posts
    1,564
    Probably because most of us dont work with AIM. If you search on AIM, you'll see a lot of unanswered questions about it.

    Originally posted by xPsychoKlownx
    Ah well i hope someone will find this eventually and actually help me because every one else received a response but me.

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7
    ahhhhh thanks alot everyone ill read as much as i can about those but if i cant find it im comin back to this post
    Last edited by xPsychoKlownx; Mar 13th, 2004 at 12:52 AM.

  8. #8
    G&G Moderator chemicalNova's Avatar
    Join Date
    Jun 2002
    Location
    Victoria, Australia
    Posts
    4,246
    I have seen some autoresponders and such for AIM. They were programmed in C++ though. They may still be worth a look, since they obviously know how to send text to an AIM window, you can find the handles for the AIM message window from the source. Then use SendMessage() in VB to send whatever you want..


    Phreak

    Visual Studio 6, Visual Studio.NET 2005, MASM

  9. #9

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7
    Can anyone tell me what im doing wrong:

    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 FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
    Private Declare Function SetWindowText Lib "user32.dll" Alias "SetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String) As Long
    Private Declare Function SendMessage Lib "user32.dll" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
    Dim hWnd1 As String
    Dim hWnd2 As String
    Dim hWnd3 As String
    Dim hWnd4 As String
    Private Const WM_SETTEXT As Long = &HC


    Private Sub Command1_Click()

    hWnd1 = FindWindow(vbNullString, Text1.Text)
    hWnd2 = FindWindowEx(hWnd1, ByVal 0&, Text2.Text, vbNullString)
    SetWindowText hWnd2, Text3.Text

    End Sub



    I decided to start simple and use a text document. So in text1 I have New Text Document - Notepad. In text2 I have Edit. In text3 I have the message I want it to send. I guess I should use the send message way because I waslooking for changes in
    ms spy ++ and I noticed that it changed the empty caption property of the text field to whatever I have in text3.text. So can anyone show me how to do this right or just help me with writing it using sendmessage api ?

  10. #10

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7
    Alright well I figured out how to use the sendmessage api thanks alot everyone, but now the trouble is like How can I get a handle on the place where you type your text in Aol Instant Messenger. I am sort of confused because I can get the handle of the main window and the class name of the text box is Ate32Class but so is the part where the conversation is, so is there any way to distuinguish which is the proper one to retrieve the handle from?


    I found this used many times throughout the forum so I decided to use it in mine(I of course changed it around, or tried to atleast )

    Dim notepad As Long, editx As Long
    notepad = FindWindow(vbNullString, Text3.Text)
    editx = FindWindowEx(notepad, 0&, "Ate32Class", vbNullString)


    I have that but I dont know how to specify which Ate32Class to get the handle of, can anyone please help me lol.

  11. #11

    Thread Starter
    New Member
    Join Date
    Mar 2004
    Posts
    7

    [Resolved]

    ah i got it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width