Skrip Posted March 14, 2008 Share Posted March 14, 2008 (edited) 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^ ERRORWhy 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 March 14, 2008 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 More sharing options...
Skrip Posted March 15, 2008 Author Share Posted March 15, 2008 Bumpin... [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 More sharing options...
martin Posted March 15, 2008 Share Posted March 15, 2008 $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 More sharing options...
ptrex Posted March 15, 2008 Share Posted March 15, 2008 @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 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Skrip Posted March 16, 2008 Author Share Posted March 16, 2008 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 More sharing options...
DaleHohm Posted March 16, 2008 Share Posted March 16, 2008 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 More sharing options...
ptrex Posted March 16, 2008 Share Posted March 16, 2008 @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 Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New Link to comment Share on other sites More sharing options...
Oldschool Posted March 17, 2008 Share Posted March 17, 2008 In my sig you find an object browser to look for methods and properties of a Com object.Or you can always go with the classic OLE-COM Object Viewer. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now