Dear Tapper,
Thank you for the feedback. What version of Skype4COM.dll you use ? I tried to get the same errors with 1.0.0.2 (included in the Skype Contacts package) but without success.
I started the following script from command line and examined output, both the audio device names were correct and also command event handler parameter aCmd.Id was not null.
CODE
'// Create a Skype4COM object:
Set oSkype = WScript.CreateObject("Skype4COM.Skype","Skype_")
'// Start the Skype client:
If Not oSkype.Client.IsRunning Then oSkype.Client.Start() End If
'// Connect to the Skype API:
oSkype.Attach
WScript.Echo "Audio in ["& oSkype.Settings.AudioIn &"]"
WScript.Echo "Audio out ["& oSkype.Settings.AudioOut &"]"
'// Send the following non-blocking commands:
oSkype.SendCommand(oSkype.Command(0, "FOCUS"))
oSkype.SendCommand(oSkype.Command(11, "GET AUDIO_IN", "AUDIO_IN"))
oSkype.SendCommand(oSkype.Command(22, "GET AUDIO_OUT", "AUDIO_OUT"))
WScript.Sleep(1000)
'// Send the following blocking commands (note the True (blocking) variant for each command):
oSkype.SendCommand(oSkype.Command(33, "GET CURRENTUSERHANDLE", "CURRENTUSERHANDLE", True))
oSkype.SendCommand(oSkype.Command(44, "GET USER echo123 FULLNAME", "USER echo123 FULLNAME", True))
oSkype.SendCommand(oSkype.Command(55, "GET USER echo123 DISPLAYNAME", "USER echo123 DISPLAYNAME", True))
oSkype.SendCommand(oSkype.Command(66, "GET USER echo123 COUNTRY", "USER echo123 COUNTRY", True))
WScript.Sleep(1000)
'//As with command objects, search commands can be defined as blocking or non-blocking, and the default value is False, non-blocking. A blocking search requires a response before activities continue. Following is a blocking search (note the True (blocking) variant:
Set oBlockingSearch = oSkype.Command(8888, "SEARCH USERS echo123", "USERS ", True)
oSkype.SendCommand(oBlockingSearch)
WScript.Echo "Search Result:" & oBlockingSearch.Reply
'//A non-blocking search does not require a response:
Set oSearchCommand = oSkype.Command(9999, "SEARCH USERS john doe", "USERS ")
oSkype.SendCommand(oSearchCommand)
WScript.Echo "Sleeping ..."
WScript.Sleep(30000)
Public Sub Skype_AttachmentStatus(ByVal aStatus)
WScript.Echo ">Attachment status " & oSkype.Convert.AttachmentStatusToText(aStatus)
If aStatus = oSkype.Convert.TextToAttachmentStatus("AVAILABLE") Then oSkype.Attach() End If
End Sub
Public Sub Skype_Command(ByRef aCmd)
WScript.Echo "C(" & aCmd.Id & "): " & aCmd.Command
End Sub
Public Sub Skype_Reply(ByRef aCmd)
WScript.Echo "R(" & aCmd.Id & "): " & aCmd.Reply
End Sub
For example the output for audio devices follows:
CODE
C:Program FilesSkypeActiveXContacts>cscript test.vbs
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
C(1): PROTOCOL 5
R(0): CURRENTUSERHANDLE andreskaasik
R(0): USERSTATUS ONLINE
R(1): PROTOCOL 5
C(2): GET SKYPEVERSION
R(2): SKYPEVERSION 2.5.0.86
>Attachment status Ühendatud
C(3): #3 GET AUDIO_IN
R(3): #3 AUDIO_IN SigmaTel Audio
Audio in [SigmaTel Audio]
C(4): #4 GET AUDIO_OUT
R(4): #4 AUDIO_OUT SigmaTel Audio
Audio out [SigmaTel Audio]
Sleeping ...