Jump to content

Sending a message to a skype group conversation?


Hyflex
 Share

Go to solution Solved by FireFox,

Recommended Posts

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

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_ChatGetTopic
Note 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 by FireFox
Link to comment
Share on other sites

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

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...