i've been having this problem for a while now. the only error is the "event 'load' cannot be found" and i've searched high and low for a solution to it. the code is for a skype auto-responder.
could somebody help me find the solution to it please? :0
Imports System
Imports SKYPE4COMLib
Imports System.Windows.Forms
Module SkypeAutoResponder
Sub Main()
End Sub
Public Class Line
End Class
Public Class Form1
Private skype As Skype
Dim trigger As String = "msg=" 'use this as the command.
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
skype = New Skype
skype.Attach() 'attaches our program to skype.
AddHandler skype.MessageStatus, AddressOf skype_stat
End Sub
Public Sub skype_stat(ByVal msg As ChatMessage, ByVal status As TChatMessageStatus)
If msg.Body.Contains(trigger) Then 'if it has the trigger.
Dim sendme As String = msg.Body.Replace(trigger, "") 'removes the trigger from the message. for example if the message was "msg=sunlight", the it would be "sunlight"
skype.SendMessage(msg.Sender.Handle, cases(sendme)) 'sends message.
End If
End Sub
Public Function cases(ByVal sent As String)
Dim result As String
Select Case sent
Case Is = "HELP"
result = "nice to make your acquantance (or however it's spelt). i am c86, a dumb ai programmed to speak for my creator, ollie, and to mimic his likeness as much as possible." ' then send hey.
Exit Select
Case Is = "hey."
result = "hey!"
Exit Select
Case Is = "how're you?"
result = "not bad thanks, actually feeling kind of digital. hehe. how're you? ^u^"
Exit Select
Case Is = "i feel awful!"
result = "sorry to hear that. :( i would be more sympathetic, but i'm just an ai."
Exit Select
Case Is = "i feel great!"
result = "i wish i was programmed complex enough to feel emotion. :/"
Exit Select
Case Is = "later."
result = "later! :D"
Exit Select
Case Else
result = "Not a valid command"
End Select
Return result
End Function
End Class
End Module