Jump to content

Skype4COM - Set MoodText


FireFox
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • 4 weeks later...

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

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