Jump to content

Skype COM Objects


 Share

Recommended Posts

Information:

http://forum.skype.com/index.php?showtopic=73172

https://developer.skype.com/Docs/Skype4COM

https://developer.skype.com/Docs/Skype4COMLib/Classes

$oSkype =  ObjCreate("Skype4COM.Skype", "Skype_")
GUICtrlSetData($Label2, $oSkype.CurrentUser())

It fails on the 2nd line.

C:\Program Files\AutoIt3\skype_control.au3 (52) : ==> Variable must be of type "Object".:

GUICtrlSetData($Label2, $oSkype.CurrentUser())

GUICtrlSetData($Label2, $oSkype^ ERROR

Why does this not work?

Link to info on this object: https://developer.skype.com/Docs/Skype4COMLib/User

EDIT: And do I need the dll to use the COM? ( https://developer.skype.com/Download?action...OM-1.0.28.0.zip )

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

$oSkype =  ObjCreate("Skype4COM.Skype", "Skype_")
GUICtrlSetData($Label2, $oSkype.CurrentUser())
Should it be

GUICtrlSetData($Label2, $oSkype.CurrentUser)?

EDIT: And do I need the dll to use the COM?

I don't know anything about the Skype API but I would expect that you need to register the dll with regsvr32.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

@Firestorm.

This is all can offer.

; Create a Skype4COM object:
$oSkype = ObjCreate("Skype4COM.Skype") 

If Not $oSkype.Client.IsRunning Then 
    $oSkype.Client.Start() 
EndIf


; Create a UserCollection object and add the multichat users to this collection:
$oMembers = ObjCreate("Skype4COM.UserCollection")
$oMembers.Add($oSkype.User("skypeuser1"))
$oMembers.Add($oSkype.User("skypeuser2"))
$oMembers.Add($oSkype.User("skypeuser3"))

; Create a multichat:
$oChat = $oSkype.CreateChatMultiple($oMembers) 

; Open a chat window:
$oChat.OpenWindow() 

; Set a chat topic:
$oChat.Topic = "Skype is cool"


; Send a chat message:
$oMsg = $oChat.SendMessage("Greetings!")

; Leave a chat:
$oChat.Leave

regards

ptrex

Link to comment
Share on other sites

Thanks alot, but can I ask where you got those object names from? I don't see them in the docs.

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

After your ObjCreate I would also recommend:

If Not IsObj($oSkype) Then ConsoleWrite("Object Creation Failed" & @CR)

Which would have caught the problem you had with your original code...

Dale

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y

Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Link to comment
Share on other sites

@Firestorm

Google is your friend.

And sometimes some tools can help.

In my sig you find an object browser to look for methods and properties of a Com object.

The Skype COM DLL is found on your system : C:\PROGRA~1\COMMON~1\Skype\SKYPE4~1.DLL

regards

ptrex

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...