Hyflex Posted September 9, 2013 Share Posted September 9, 2013 Hey,I've had a look at the Skype UDF but I am unable to find what I need...'?do=embed' frameborder='0' data-embedContent>>I basically need help having a minimised bit of code to send a message to a skype group conversation without loading the window or anything.In Python for example it would be using the Skype4Py library with:groupTopic = 'Insert a Topic Here' for chat in skypeClient.BookmarkedChats: if chat.Topic == groupTopic: chat.SendMessage("Send a Message Here")Anyone know how to achieve the same with AutoIt? Link to comment Share on other sites More sharing options...
FireFox Posted September 10, 2013 Share Posted September 10, 2013 (edited) Hi,This would be this:#include "Skype.au3" Local $sTopic = "Insert a Topic Here" Local $aBookMarkedChat = _Skype_ChatGetBookmarked(), $oChattmp = 0 For $i = 0 To UBound($aBookMarkedChat) -1 $oChattmp = $aBookMarkedChat[$i] If _Skype_ChatGetTopic($oChattmp) = $sTopic Then _Skype_ChatSendMessage($oChattmp, "Send a Message Here") EndIf Next Func _Skype_ChatGetTopic($oChat) Return $oChat.Topic EndFunc ;==>_Skype_ChatGetTopicNote that the Skype UDF is lacking of a _Skype_ChatGetTopic function (I forgot it), so I added it in this example.You can also try this: except that it's with a chatname and not a chat topic.Br, FireFox. Edited September 10, 2013 by FireFox Hyflex 1 Link to comment Share on other sites More sharing options...
Hyflex Posted September 10, 2013 Author Share Posted September 10, 2013 Works wonderfully, you are a star You should add that to the functionlist as it's perfect. Link to comment Share on other sites More sharing options...
Hyflex Posted September 10, 2013 Author Share Posted September 10, 2013 Edit, Just tried it on a different computer and it comes up with the following:Running AU3Check (1.54.22.0) from:C:\Program Files (x86)\AutoIt3 +>19:40:13 AU3Check ended.rc:0 >Running:(3.3.8.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\A\Desktop\ex.au3" --> Press Ctrl+Alt+F5 to Restart or Ctrl+Break to Stop C:\Users\A\Desktop\Skype.au3 (3543) : ==> Array variable subscript badly formatted.: Local $aChats[$iChats], $i = 0 Local $aChats[^ ERROR ->19:40:14 AutoIt3.exe ended.rc:1 >Exit code: 1 Time: 1.831 Any ideas? Link to comment Share on other sites More sharing options...
FireFox Posted September 10, 2013 Share Posted September 10, 2013 (edited) The function is not safe (needs to be fixed), if there is no bookmarked chats it will crash. Edited September 10, 2013 by FireFox Hyflex 1 Link to comment Share on other sites More sharing options...
Solution FireFox Posted September 10, 2013 Solution Share Posted September 10, 2013 I updated the UDF Hyflex 1 Link to comment Share on other sites More sharing options...
Hyflex Posted September 10, 2013 Author Share Posted September 10, 2013 Works great now 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