Joined: 15 Dec 2005 Posts: 3 Location: Pontlottyn, Wales
Posted: Thu Dec 15, 2005 12:58 pm Post subject: MSN Toolkit VB 2005 (.net).. Any ideas on this error?
Right, here is the full application code i have produced so far:
Code:
Public Class Form1
Dim iCount As Integer
Dim limit As Integer
Public WithEvents msn As MessengerAPI.Messenger
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
msn = New MessengerAPI.Messenger
End Sub
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Private Sub Away_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Away.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_AWAY
End Sub
Private Sub BRB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BRB.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_BE_RIGHT_BACK
End Sub
Private Sub Busy_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Busy.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_BUSY
End Sub
Private Sub Mail_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mail.Click
msn.OpenInbox()
End Sub
Private Sub Profile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Profile.Click
msn.ViewProfile(Semail)
End Sub
Private Sub Status_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Status.Click
msn.ContactsSortOrder = MessengerAPI.MUASORT.MUASORT_ONOFFLINE
End Sub
Private Sub Groups_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Groups.Click
msn.ContactsSortOrder = MessengerAPI.MUASORT.MUASORT_GROUPS
End Sub
Private Sub Lunch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Lunch.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_OUT_TO_LUNCH
End Sub
Private Sub Offline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Offline.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
End Sub
Private Sub Online_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Online.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
End Sub
Private Sub Phone_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Phone.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ON_THE_PHONE
End Sub
Private Sub StatusSpam_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StatusSpam.Click
limit = 0
Do Until limit = 15
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_INVISIBLE
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
limit = limit + 1
Loop
End Sub
Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_BUSY
msn.InstantMessage(Semail.Text)
msn.windowHWnd& = FindWindow("lpclassname", vbNullString)
For iCount = 1 To 100000000
Next iCount
limit = 0
Do Until limit = 10
limit = limit + 1
SendMessage(msn.WindowHWnd&, &H111, &H2B1, 0&)
Loop
msn.MyStatus = MessengerAPI.MISTATUS.MISTATUS_ONLINE
End Sub
End Class
all the code runs fine and has no bugs etc.
When button1 is clicked, which is the send 10 nudges option it gives out this error
Quote:
public member 'windowHWnd' on type 'MessengerClass' not found.
Joined: 15 Dec 2005 Posts: 3 Location: Pontlottyn, Wales
Posted: Thu Dec 15, 2005 1:11 pm Post subject:
well it can be annoying yes, but no, mainly its because im a beginner at vb and im just making an application using a few functions to get used to them
Basically that means it's not finding the window you want. Maybe one of these days someone will create a VB bot that doesn't use the Windows API to manipulate things LOL _________________ Check out Botworld! A dev resource for things bot.
Downloads, articles, news, fourm and more.
http://botworld.marzopolis.com
Joined: 15 Dec 2005 Posts: 3 Location: Pontlottyn, Wales
Posted: Wed Dec 21, 2005 1:05 pm Post subject:
it finds the correct window. its crashing when the nudges try sending, And im pretty new to VB when ive learn a little more i will use the msn protocol to do things like me m8 does. he never touches the api
yes ALIENS OMG LOLOLOLOLOLOLOLOLOL ..... how would you suggest. and mybe ill do that. can prolly rape it in memory. lets go! wait a go make a giant game trainer for windows live messenger