Jump to content
Sign in to follow this  
FireFox

Skype4COM - Set MoodText

Recommended Posts

FireFox

Hi,

Skype4COM docs here

I want to set the MoodText but I havnt found the function to set it :)

Here is an example to get it :

$oSkype = ObjCreate('Skype4COM.Skype')
$oSkypeEvent = ObjEvent($oSkype,'Skype_')
$oError = ObjEvent('AutoIt.Error','MyErrFunc')

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

While 1
    Sleep(250)
    If $oSkype.CurrentUserStatus = $oSkype.Convert.TextToUserStatus('ONLINE') Then
        ExitLoop
    Else
        $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus('ONLINE'))
    EndIf
WEnd


$oSkype.Attach()
MsgBox(64,'Skype4COM',$oSkype.CurrentUserProfile.MoodText)


Func Skype_AttachmentStatus($aStatus)
    MsgBox(64,'Skype4COM','Attachment status ' & $oSkype.Convert.AttachmentStatusToText($aStatus))
    If $aStatus = $oSkype.Convert.TextToAttachmentStatus('AVAILABLE') Then
        $oSkype.Attach()
    EndIf
EndFunc

Func MyErrFunc()
    ConsoleWrite('Skype4COM Error !' & @CRLF)
EndFunc

Thanks for anyhelp.

Cheers, FireFox.


 

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
Ealric

HRESULT UserMood([in] IUser *pUser,[in] BSTR MoodText)

This event is caused by a change in the mood text of the user.

Parameters:

[in] pUser contains the interface pointer for the User object.

[in] MoodText contains the new mood text.

Found with GoogleHack

http://www.google.com/search?hl=en&q=+...mp;aq=f&oq=


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Share this post


Link to post
Share on other sites
FireFox

@Ealric

Thanks, I will try it as soon as I can :)

Cheers, FireFox.


 

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 tried the function, but I can't get it to work...

$oSkype = ObjCreate('Skype4COM.Skype')
$oSkypeEvent = ObjEvent($oSkype,'Skype_')
$oError = ObjEvent('AutoIt.Error','MyErrFunc')

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

While 1
    Sleep(250)
    If $oSkype.CurrentUserStatus = $oSkype.Convert.TextToUserStatus('ONLINE') Then
        ExitLoop
    Else
        $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus('ONLINE'))
    EndIf
WEnd

;-------------------------------------------------------------------------------------------------

$oSkype.Attach()
$User = $oSkype.CurrentUser ;Get Current User | this doesn't work (wrong function name call perhaps)
MsgBox(64, 'Skype4COM', $User)
$oSkype.UserMood($User, 'new text mood') ;Set MoodText | this doesn't work...

;https://developer.skype.com/Docs/Skype4COMLib/_ISkypeEvents
;HRESULT UserMood([in] IUser *pUser,[in] BSTR MoodText)
;This event is caused by a change in the mood text of the user.
;[in] pUser contains the interface pointer for the User object.
;[in] MoodText contains the new mood text.

;-------------------------------------------------------------------------------------------------

MsgBox(64,'Skype4COM',$oSkype.CurrentUserProfile.MoodText) ;Read MoodText

Func Skype_AttachmentStatus($aStatus)
    MsgBox(64,'Skype4COM','Attachment status ' & $oSkype.Convert.AttachmentStatusToText($aStatus))
    If $aStatus = $oSkype.Convert.TextToAttachmentStatus('AVAILABLE') Then
        $oSkype.Attach()
    EndIf
EndFunc

Func MyErrFunc()
    ConsoleWrite('Skype4COM Error !' & @CRLF)
EndFunc

Thanks for anyhelp....

Cheers, FireFox.

Edited by FireFox

 

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
MyTech

Hi,

Skype4COM docs here

I want to set the MoodText but I havnt found the function to set it :P

Here is an example to get it :

$oSkype = ObjCreate('Skype4COM.Skype')
$oSkypeEvent = ObjEvent($oSkype,'Skype_')
$oError = ObjEvent('AutoIt.Error','MyErrFunc')

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

While 1
    Sleep(250)
    If $oSkype.CurrentUserStatus = $oSkype.Convert.TextToUserStatus('ONLINE') Then
        ExitLoop
    Else
        $oSkype.ChangeUserStatus($oSkype.Convert.TextToUserStatus('ONLINE'))
    EndIf
WEnd


$oSkype.Attach()
MsgBox(64,'Skype4COM',$oSkype.CurrentUserProfile.MoodText)


Func Skype_AttachmentStatus($aStatus)
    MsgBox(64,'Skype4COM','Attachment status ' & $oSkype.Convert.AttachmentStatusToText($aStatus))
    If $aStatus = $oSkype.Convert.TextToAttachmentStatus('AVAILABLE') Then
        $oSkype.Attach()
    EndIf
EndFunc

Func MyErrFunc()
    ConsoleWrite('Skype4COM Error !' & @CRLF)
EndFunc

Thanks for anyhelp.

Cheers, FireFox.

I Posted Skype Moodtext changing to Current Itunes Song

http://www.autoitscript.com/forum/index.ph...21334&st=15

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.