Jump to content
Sign in to follow this  
Hyflex

Sending a message to a skype group conversation?

Recommended Posts

Hyflex

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?

Share this post


Link to post
Share on other sites
FireFox

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
  • Like 1

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
Hyflex

Works wonderfully, you are a star :)

You should add that to the functionlist as it's perfect.

Share this post


Link to post
Share on other sites
Hyflex

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?

Share this post


Link to post
Share on other sites
FireFox

The function is not safe (needs to be fixed), if there is no bookmarked chats it will crash.

Edited by FireFox
  • Like 1

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
Share on other sites
FireFox

I updated the UDF ;)

  • Like 1

 

OS : Win XP SP2 (32 bits) / Win 7 SP1 (64 bits) / Win 8 (64 bits) | Autoit version: latest stable / beta.
Hardware : Intel(R) Core(TM) i5-2400 CPU @ 3.10Ghz / 8 GiB RAM DDR3.

My UDFs : Skype UDF | TrayIconEx UDF | GUI Panel UDF | Excel XML UDF | Is_Pressed_UDF

My Projects : YouTube Multi-downloader | FTP Easy-UP | Lock'n | WinKill | AVICapture | Skype TM | Tap Maker | ShellNew | Scriptner | Const Replacer | FT_Pocket | Chrome theme maker

My Examples : Capture toolIP Camera | Crosshair | Draw Captured Region | Picture Screensaver | Jscreenfix | Drivetemp | Picture viewer

My Snippets : Basic TCP | Systray_GetIconIndex | Intercept End task | Winpcap various | Advanced HotKeySet | Transparent Edit control

 

Share this post


Link to post
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
Sign in to follow this  

×