Skype And MediaMonkey!

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

Re: Skype And MediaMonkey!

Postby sakurakessho » Sat Jul 26, 2008 11:33 pm

For those of you wanting full IM support check out Digsby. It always detects MM's now playing for tis 'listening to' feature.
*MM Gold as of 04.23.08*
sakurakessho
 
Posts: 76
Joined: Sat Jun 23, 2007 6:15 pm

Re: Skype And MediaMonkey!

Postby Guest » Tue Aug 05, 2008 1:47 am

Peke wrote:Copy/paste script here so that we can look at it?


Here you go:

Code: Select all
    ''==========================================================================
    ' NAME: SkypePlayMood v1.3 (SkypeMoodText.vbs)
    '
    ' AUTHOR : Peke
    ' ORIGINAL DATE : 10.10.2006
    '
    ' ÇO-AUTHOR : Cran
    ' UPDATED : 30.01.2008
    ' INSTALL: Download and install Skype4COM Release (https://developer.skype.com/Download)
    '          Save This Script in MM\Scripts\Auto folder and restart MM
    ' NOTE   : Use latest Skype and allow MM to access Skype
    '
    ' UPDATES:
    ' v1.3:
    '-------
    ' - revert to original mood when pausing or stopping playback
    ' - fix script error when closing MediaMonkey with no track.
    '==========================================================================
    Dim MoodPrefix, AppOriginal, MediaMonkeyMoodFirst

    'Edit MoodPrefix if you want to have Custom Prefix of now Playing Track
    MoodPrefix = "Now playing: "

    ' Append Original Mood text to MediaMonkey Mood Text (Default TRUE)
    AppOriginal = True

    ' Used only if Appending To original Mood Text is TRUE. Change this if you wish that
    ' MediaMonkey Mood Text is added to Original Mood Text(Default True)
    MediaMonkeyMoodFirst = True

    '// Attach To MMObject For Debbuging Only
    'Dim SDB
    'Set SDB = CreateObject("SongsDB.SDBApplication")

    ' Added by Cran
    Dim OldMsg

    Sub OnStartup
      '// Start the Skype client if not Running
      Dim ini, list, list2
      Set ini = SDB.IniFile

      '//Save Skype Mood text to revert on MM Exit
      Set list = GetObject("winmgmts:")
      Set list2 = list.ExecQuery("Select * from Win32_Process where name like 'Skype%'")
      If list2.count > 0 Then
        '// Create a Skype4COM object:
        Set oSkype = CreateObject("Skype4COM.Skype")
        If InStr(oSkype.CurrentUserProfile.MoodText,MoodPrefix) = 0 Then
          ini.StringValue("SkypeMood","OldMsg") = oSkype.CurrentUserProfile.MoodText
        End If
      End If
      Call Script.RegisterEvent(SDB, "OnPlay", "SetSkypeMood")
      Call Script.RegisterEvent(SDB, "OnShutdown", "RevertSkypeMood")
      ' Added by Cran : revert to original skype mood
      Call Script.RegisterEvent(SDB, "OnStop", "RevertSkypeMood")
      Call Script.RegisterEvent(SDB, "OnPause", "RevertSkypeMood")
    End Sub

    Sub SetSkypeMood
      Dim ini, list, list2
      Set ini = SDB.IniFile
      Set list = getobject("winmgmts:")
      Set list2 = list.ExecQuery("Select * from Win32_Process where name like 'Skype%'")
      If (list2.count > 0) Then
        '// Create a Skype4COM object:
        Set oSkype = CreateObject("Skype4COM.Skype")
        '//Set Skype Mood text to show now playing
        If Not ((InStr(oSkype.CurrentUserProfile.MoodText,MoodPrefix) > 0) Or (ini.StringValue("SkypeMood","OldMsg") = oSkype.CurrentUserProfile.MoodText)) Then
          ini.StringValue("SkypeMood","OldMsg") = oSkype.CurrentUserProfile.MoodText
         OldMsg = oSkype.CurrentUserProfile.MoodText
        End If
        If AppOriginal Then
          If MediaMonkeyMoodFirst Then
            oSkype.CurrentUserProfile.MoodText = MoodPrefix &SDB.Player.CurrentSong.ArtistName &" - " &SDB.Player.CurrentSong.Title &" (" &SDB.Player.CurrentSong.SongLengthString &")" &Chr(13) &Chr(10) &ini.StringValue("SkypeMood","OldMsg")
          Else
            oSkype.CurrentUserProfile.MoodText = ini.StringValue("SkypeMood","OldMsg") &Chr(13) &Chr(10) &MoodPrefix &SDB.Player.CurrentSong.ArtistName &" - " &SDB.Player.CurrentSong.Title &" (" &SDB.Player.CurrentSong.SongLengthString &")"
          End If
        Else
          oSkype.CurrentUserProfile.MoodText = MoodPrefix &SDB.Player.CurrentSong.ArtistName &" - " &SDB.Player.CurrentSong.Title &" (" &SDB.Player.CurrentSong.SongLengthString &")"
        End If
      End If
    End Sub

    Sub RevertSkypeMood
      ' The Sub doesn't crash anymore, but for 'production'
      ' code, but you know, user experience has to stay pleasant
      ' even if the code bombs.
      On Error Resume Next
      '// Start the Skype client if not Running
      Dim ini, list, list2
      Dim sOldMsg
      Set ini = SDB.IniFile

      Set list = getobject("winmgmts:")
      Set list2 = list.ExecQuery("Select * from Win32_Process where name like 'Skype%'")
      If list2.count > 0 Then
        '// Create a Skype4COM object:
        Set oSkype = CreateObject("Skype4COM.Skype")
       If Not( ini Is Nothing ) Then
          sOldMsg = ini.StringValue("SkypeMood","OldMsg")
          If  sOldMsg = "" Then
             sOldMsg = OldMsg
          End If
       Else

       End If
       If Not( oSkype Is Nothing) Then
          '//revert saved Skype Mood
          oSkype.CurrentUserProfile.MoodText = sOldMsg
          '// Clear Saved mood
       End if
      End If
    End Sub
Guest
 

Re: Skype And MediaMonkey!

Postby floorman » Tue Aug 05, 2008 1:55 am

Damn... forgot to logon on the previous post. I'm adding the screenshot as well.
Image
Image
floorman
 
Posts: 2
Joined: Tue Aug 05, 2008 1:48 am

Re: Skype And MediaMonkey!

Postby floorman » Wed Aug 27, 2008 2:09 pm

Solved...

Obviously the problem was (once again) in front of the screen :oops: :roll: I have completely forgotten I have the AMIP plugin installed in the MM. After disabling it the script works like the Swiss watch. Sorry for causing the panic :)
floorman
 
Posts: 2
Joined: Tue Aug 05, 2008 1:48 am

Re: Skype And MediaMonkey!

Postby reboho » Thu Dec 02, 2010 4:24 pm

Is there an SDB.Player.CurrentSong.AlbumName? I would prefer that to song length. I already modified the MoodPrefix to be "(music)" but I would like to take it a step further and replace the song time length with the album name.
reboho
 
Posts: 2
Joined: Thu Dec 02, 2010 12:59 pm

Re: Skype And MediaMonkey!

Postby reboho » Fri Dec 03, 2010 4:33 pm

Nevermind, figured it out. SDB.Player.CurrentSong.AlbumName is correct, works like I was hoping.
reboho
 
Posts: 2
Joined: Thu Dec 02, 2010 12:59 pm

Re: Skype And MediaMonkey!

Postby UksusoFF » Wed Oct 26, 2011 3:31 pm

Not worked for MM4 :(
Image Image
UksusoFF
 
Posts: 64
Joined: Sat Oct 31, 2009 10:04 am
Location: Russia

Previous

Return to Need Help with Addons?

Who is online

Users browsing this forum: zuilserip and 12 guests