hi there, i tryed the received.au3, but it didn´t work for me?! maybe someone else can check it please?!
i deleted some code from the received.au3 i didn´t need, for example "online check" and so on..
skype is online, Skype4COM.dll is in the same folder like the edited *.au3, *.au3 script is running,
some incoming chatevents on skype BUT it seems the code never jumped in one of these functions?!
Sending a msg with another autoit script to a specified user/chat works fine!
where is the mistake?! maybe someone can help please...
below the code:
;// Create a Skype4COM object:
$oSkype = ObjCreate("Skype4COM.Skype")
$oSkypeEvent = ObjEvent($oSkype,"Skype_")
$oError = ObjEvent("AutoIt.Error","MyErrFunc")
;// Declare the following Skype constants:
$cAttachmentStatus_Available = $oSkype.Convert.TextToAttachmentStatus("AVAILABLE")
$cMessageStatus_Sending = $oSkype.Convert.TextToChatMessageStatus("SENDING")
$cMessageStatus_Received = $oSkype.Convert.TextToChatMessageStatus("RECEIVED")
$cMessageType_Said = $oSkype.Convert.TextToChatMessageType("SAID")
$cMessageType_Left = $oSkype.Convert.TextToChatMessageType("LEFT")
;// Sleep
While 1
Sleep(1000)
WEnd
;// The AttachmentStatus event handler monitors attachment status and automatically attempts to reattach to the API following loss of connection:
Func Skype_AttachmentStatus($aStatus)
MsgBox(0,"","Attachment status " & $oSkype.Convert.AttachmentStatusToText($aStatus))
If $aStatus = $oSkype.Convert.TextToAttachmentStatus("AVAILABLE") Then
$oSkype.Attach()
EndIf
EndFunc
;// The MessageStatus event handler monitors message status, decodes received messages and, for those of type "Said", sends an autoresponse quoting the original message:
Func Skype_MessageStatus($aMsg, $aStatus)
MsgBox(0,"","Message " & $aMsg.Id & " status " & $oSkype.Convert.ChatMessageStatusToText($aStatus))
If $aStatus = $cMessageStatus_Received Then
DecodeMsg($aMsg)
If $aMsg.Type = $cMessageType_Said Then
MsgBox(0,"","TEST")
;$oSkype.SendMessage($aMsg.FromHandle, "This is autoresponse.")
$aMsg.Chat.SendMessage("You said [" & $aMsg.Body & "]")
EndIf
EndIf
EndFunc
;// The DecodeMsg event handler decodes messages in a chat and converts leave reasons to text for messages of type "Left":
Func DecodeMsg($oMsg)
MsgBox(0,"","DecodeMsg TEST")
$sText = $oMsg.FromHandle & " " & $oSkype.Convert.ChatMessageTypeToText($oMsg.Type) & ":"
If StringLen($oMsg.Body) Then
$sText = $sText & " " & $oMsg.Body
EndIf
Dim $oUser
For $oUser In $oMsg.Users
$sText = $sText & " " & $oUser.Handle
Next
If $oMsg.Type = $cMessageType_Left Then
$sText = $sText & " " & $oSkype.Convert.ChatLeaveReasonToText($oMsg.LeaveReason)
EndIf
MsgBox(0,"",$sText)
EndFunc
Func MyErrFunc()
;Do Nothing
EndFunc