|
-
Mar 11th, 2004, 11:26 PM
#1
Thread Starter
New Member
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?
-
Mar 12th, 2004, 05:15 PM
#2
Thread Starter
New Member
Ah well i hope someone will find this eventually and actually help me because every one else received a response but me.
-
Mar 12th, 2004, 05:20 PM
#3
Supreme User
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.....
-
Mar 12th, 2004, 06:04 PM
#4
Thread Starter
New Member
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
-
Mar 12th, 2004, 06:28 PM
#5
-
Mar 12th, 2004, 06:42 PM
#6
Frenzied Member
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.
-
Mar 13th, 2004, 12:49 AM
#7
Thread Starter
New Member
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.
-
Mar 13th, 2004, 01:16 AM
#8
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
-
Mar 13th, 2004, 11:26 AM
#9
Thread Starter
New Member
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 ?
-
Mar 13th, 2004, 03:52 PM
#10
Thread Starter
New Member
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.
-
Mar 14th, 2004, 01:16 PM
#11
Thread Starter
New Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|